media: siano: Fix error handling in smsdvb_module_init()
commit734ac57e47upstream. 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:3f6b87cff6("[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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3e7fc0606e
commit
192b87608c
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user