From: Yuan Can Date: Tue, 22 Oct 2024 06:50:37 +0000 (+0800) Subject: media: siano: Fix error handling in smsdvb_module_init() X-Git-Tag: v5.10.237~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9580754fac789785cb9bbbc9b3685e86f6fa143c;p=thirdparty%2Fkernel%2Fstable.git media: siano: Fix error handling in smsdvb_module_init() commit 734ac57e47b3bdd140a1119e2c4e8e6f8ef8b33d upstream. 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 Acked-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c index 7cc654bc52d37..660e348708e6a 100644 --- a/drivers/media/common/siano/smsdvb-main.c +++ b/drivers/media/common/siano/smsdvb-main.c @@ -1210,6 +1210,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");