Commit 734ac57e authored by Yuan Can's avatar Yuan Can Committed by Hans Verkuil
Browse files

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: 3f6b87cf ("[media] siano: allow showing the complete statistics via debugfs")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Acked-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
parent b773530a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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");