aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-09-15 19:25:10 +0800
committerSakari Ailus <sakari.ailus@linux.intel.com>2026-09-26 16:48:26 +0300
commitc0a6d78dad3af1def80f04df82bfd70456ec406c (patch)
tree603ac07529e9f7007aec917fd565c19df79a4d87 /scripts/Makefile.thinlto
parentmedia: i2c: replace some GPL headers with SPDX-License-Identifier (diff)
media: atmel-isi: release unregistered video device on remove
atmel_isi_probe() allocates the video device before registering the V4L2 async notifier. The video device is registered later from the notifier complete callback once the remote subdevice has been bound. The remove path relies on the notifier unbind callback to unregister the video device. However, if the remote subdevice is never bound, or the complete callback fails before video_register_device() succeeds, the video device remains unregistered. In that case the unbind path does not release the object allocated by video_device_alloc(), and the remove path leaks it. Only unregister the video device from the unbind callback when it has actually been registered, and clear the driver pointer afterwards. After unregistering and cleaning up the notifier, release the video device directly if the pointer is still present. This covers devices that were allocated but never registered while avoiding a second release of successfully registered devices. This issue was found by manual code inspection. Fixes: d12c9088c0b2a ("[media] atmel-isi: remove dependency of the soc-camera framework") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Reviewed-by: Eugen Hristev <ehristev@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions