linux/drivers/media/cec
Haotian Zhang 44aedcb251 media: cec: Fix debugfs leak on bus_register() failure
commit c43bcd2b2a upstream.

In cec_devnode_init(), the debugfs directory created with
debugfs_create_dir() is not removed if bus_register() fails.
This leaves a stale "cec" entry in debugfs and prevents
proper module reloading.

Fix this by removing the debugfs directory in the error path.

Fixes: a56960e8b4 ("[media] cec: add HDMI CEC framework (core)")
Cc: stable@vger.kernel.org
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-08 10:14:45 +01:00
..
core media: cec: Fix debugfs leak on bus_register() failure 2026-01-08 10:14:45 +01:00
i2c media: cec: ch7322: drop of_match_ptr for ID table 2023-07-14 12:31:12 +02:00
platform Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
usb media: cec: extron-da-hd-4k-plus: drop external-module make commands 2025-10-19 16:33:46 +02:00
Kconfig media: CEC: keep related menu entries together 2021-10-05 09:39:32 +02:00
Makefile media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00