media: siano: Fix error handling in smsdvb_module_init()
Subsystems (2)
PATCH 1/1 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")
Signed-off-by Yuan Can <[email protected]>
--- drivers/media/common/siano/smsdvb-main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/common/siano/smsdvb-main.c +2 -0
@@ -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" );
Signature · 1 line
2.17.1
Quoted 8 lines · Yuan Can
The
smsdvb_module_init()returns without checking the retval fromsmscore_register_hotplug().
If thesmscore_register_hotplug()failed, the module failed to install, leaving thesmsdvb_debugfsnot unregistered.Fixes 3f6b87cff66b ("[media] siano: allow showing the complete statistics via debugfs")Signed-off-by Yuan Can <[email protected]>
Acked-by Ricardo Ribalda <[email protected]>
Quoted 20 lines
--- drivers/media/common/siano/smsdvb-main.c | 2 ++ 1 file changed, 2 insertions(+)drivers/media/common/siano/smsdvb-main.c +2
-1@@ -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" ); --2.17.1
Signature · 1 line
Ricardo Ribalda