linux/drivers/media
Uwe Kleine-König 04d1086a62 media: i2c: et8ek8: Don't strip remove function when driver is builtin
commit 545b215736 upstream.

Using __exit for the remove function results in the remove callback
being discarded with CONFIG_VIDEO_ET8EK8=y. When such a device gets
unbound (e.g. using sysfs or hotplug), the driver is just removed
without the cleanup being performed. This results in resource leaks. Fix
it by compiling in the remove callback unconditionally.

This also fixes a W=1 modpost warning:

	WARNING: modpost: drivers/media/i2c/et8ek8/et8ek8: section mismatch in reference: et8ek8_i2c_driver+0x10 (section: .data) -> et8ek8_remove (section: .exit.text)

Fixes: c5254e72b8 ("[media] media: Driver for Toshiba et8ek8 5MP sensor")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
History 2025-04-07 10:05:46 +02:00
..
cec media: Switch to use dev_err_probe() helper 2025-03-07 16:56:32 +01:00
common media: v4l2-tpg: prevent the risk of a division by zero 2024-11-14 13:15:14 +01:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-11-22 15:37:32 +01:00
dvb-frontends media: cxd2841er: fix 64-bit division on gcc-9 2025-02-21 13:49:58 +01:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c media: i2c: et8ek8: Don't strip remove function when driver is builtin 2025-04-07 10:05:46 +02:00
mc media: mc: mark the media devnode as registered from the, start 2024-06-16 13:41:35 +02:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) 2024-08-29 17:30:41 +02:00
platform media: mediatek: vcodec: Fix VP8 stateless decoder smatch warning 2025-03-28 21:59:02 +01:00
radio media: wl128x: Fix atomicity violation in fmc_send_cmd() 2024-12-14 19:54:04 +01:00
rc media: Switch to use dev_err_probe() helper 2025-03-07 16:56:32 +01:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread 2025-02-21 13:49:59 +01:00
tuners Revert "media: tuners: fix error return code of hybrid_tuner_request_state()" 2024-10-17 15:21:16 +02:00
usb media: uvcvideo: Remove dangling pointers 2025-03-07 16:56:33 +01:00
v4l2-core media: mc: fix endpoint iteration 2025-02-21 13:49:48 +01:00
Kconfig media: remove reference to CONFIG_EMBEDDED in MEDIA_SUPPORT_FILTER 2022-09-08 18:19:29 +02:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00