diff options
| author | Yuan Can <yuancan@huawei.com> | 2024-10-22 14:50:37 +0800 |
|---|---|---|
| committer | Hans Verkuil <hverkuil@xs4all.nl> | 2025-03-06 17:28:29 +0100 |
| commit | 734ac57e47b3bdd140a1119e2c4e8e6f8ef8b33d (patch) | |
| tree | 741c1d420efcb09247f5fb23aba9f0c78702caa4 | |
| parent | b773530a34df0687020520015057075f8b7b4ac4 (diff) | |
media: siano: Fix error handling in smsdvb_module_init()
The smsdvb_module_init() returns without checking the retval from
smscore_register_hotplug().
If the smscore_register_hotplug() failed, the module failed to install,
leaving the smsdvb_debugfs not unregistered.
Fixes: 3f6b87cff66b ("[media] siano: allow showing the complete statistics via debugfs")
Cc: stable@vger.kernel.org
Signed-off-by: Yuan Can <yuancan@huawei.com>
Acked-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
| -rw-r--r-- | drivers/media/common/siano/smsdvb-main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c index 44d8fe8b220e..9b1a650ed055 100644 --- a/drivers/media/common/siano/smsdvb-main.c +++ b/drivers/media/common/siano/smsdvb-main.c @@ -1243,6 +1243,8 @@ static int __init smsdvb_module_init(void) smsdvb_debugfs_register(); rc = smscore_register_hotplug(smsdvb_hotplug); + if (rc) + smsdvb_debugfs_unregister(); pr_debug("\n"); |