Skip to content

Commit 734ac57

Browse files
Yuan Canhverkuil
authored andcommitted
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: 3f6b87c ("[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>
1 parent b773530 commit 734ac57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/media/common/siano/smsdvb-main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,8 @@ static int __init smsdvb_module_init(void)
12431243
smsdvb_debugfs_register();
12441244

12451245
rc = smscore_register_hotplug(smsdvb_hotplug);
1246+
if (rc)
1247+
smsdvb_debugfs_unregister();
12461248

12471249
pr_debug("\n");
12481250

0 commit comments

Comments
 (0)