linux/drivers/media
Haoxiang Li f736a3f478 media: mediatek: vcodec: Fix a reference leak in mtk_vcodec_fw_vpu_init()
commit cdd0f118ef upstream.

vpu_get_plat_device() increases the reference count of the returned
platform device. However, when devm_kzalloc() fails, the reference
is not released, causing a reference leak.

Fix this by calling put_device() on fw_pdev->dev before returning
on the error path.

Fixes: e25a89f743 ("media: mtk-vcodec: potential dereference of null pointer")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-08 10:17:05 +01:00
..
cec media: cec: Fix debugfs leak on bus_register() failure 2026-01-08 10:17:03 +01:00
common media: videobuf2: Fix device reference leak in vb2_dc_alloc error path 2026-01-08 10:17:04 +01:00
dvb-core treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dvb-frontends media: Kconfig: Fix spelling mistake "Tehnology" -> "Technology" 2025-08-29 11:04:02 +02:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c media: i2c: imx219: Fix 1920x1080 mode to use 1:1 pixel aspect ratio 2026-01-08 10:17:05 +01:00
mc media: mc: Clear minor number before put device 2025-09-10 10:42:13 +02:00
mmc media: mmc: siano: simplify module initialization 2024-04-08 13:48:19 +02:00
pci media: ivtv: Fix invalid access to file * 2025-10-14 15:53:37 +02:00
platform media: mediatek: vcodec: Fix a reference leak in mtk_vcodec_fw_vpu_init() 2026-01-08 10:17:05 +01:00
radio media: update Hans Verkuil's email address 2025-09-09 15:59:02 +02:00
rc media: rc: st_rc: Fix reset control resource leak 2026-01-08 10:16:59 +01:00
spi media: gs1662: remove unused struct 'gs_reg_fmt_custom' 2024-05-31 13:51:16 +02:00
test-drivers media: vidtv: initialize local pointers upon transfer of memory ownership 2026-01-02 12:57:18 +01:00
tuners media: tuner: xc5000: Fix use-after-free in xc5000_release 2025-09-17 12:15:35 +02:00
usb media: pvrusb2: Fix incorrect variable used in trace message 2026-01-02 12:57:13 +01:00
v4l2-core media: v4l2-subdev / pdx86: int3472: Use "privacy" as con_id for the privacy LED 2025-10-24 11:16:26 +02:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00