linux/drivers/media
Ma Ke 5918d914a3 media: lirc: Fix error handling in lirc_register()
[ Upstream commit 4f4098c57e ]

When cdev_device_add() failed, calling put_device() to explicitly
release dev->lirc_dev. Otherwise, it could cause the fault of the
reference count.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: a6ddd4fecb ("media: lirc: remove last remnants of lirc kapi")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-29 14:03:07 +01:00
..
cec media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt() 2025-08-28 16:24:29 +02:00
common media: videobuf2: use sgtable-based scatterlist wrappers 2025-06-27 11:05:24 +01:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-12-14 19:50:37 +01:00
dvb-frontends minmax: make generic MIN() and MAX() macros available everywhere 2025-10-19 16:21:52 +02:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: i2c: mt9v111: fix incorrect type for ret 2025-10-19 16:21:44 +02:00
mc media: mc: Clear minor number before put device 2025-10-19 16:21:50 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: pci: ivtv: Add check for DMA map result 2025-10-19 16:21:55 +02:00
platform media: s5p-mfc: remove an unused/uninitialized variable 2025-10-29 14:03:06 +01:00
radio media: wl128x: Fix atomicity violation in fmc_send_cmd() 2024-12-14 19:51:17 +01:00
rc media: lirc: Fix error handling in lirc_register() 2025-10-29 14:03:07 +01:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vivid: Change the siize of the composing 2025-06-27 11:05:24 +01:00
tuners media: tuner: xc5000: Fix use-after-free in xc5000_release 2025-10-19 16:21:27 +02:00
usb media: usbtv: Lock resolution while streaming 2025-08-28 16:24:29 +02:00
v4l2-core media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free() 2025-08-28 16:24:29 +02:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00