[PATCH] platform/x86: dell-laptop: unregister notifier on init failure

Haoxiang Li posted 1 patch 4 days, 22 hours ago
drivers/platform/x86/dell/dell-laptop.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] platform/x86: dell-laptop: unregister notifier on init failure
Posted by Haoxiang Li 4 days, 22 hours ago
Add the missing dell_laptop_unregister_notifier() call to the
failure path after notifier registration.

Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
---
 drivers/platform/x86/dell/dell-laptop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/dell/dell-laptop.c b/drivers/platform/x86/dell/dell-laptop.c
index 57748c3ea24f..5dd607e8d2ab 100644
--- a/drivers/platform/x86/dell/dell-laptop.c
+++ b/drivers/platform/x86/dell/dell-laptop.c
@@ -2551,6 +2551,7 @@ static int __init dell_init(void)
 	if (mute_led_registered)
 		led_classdev_unregister(&mute_led_cdev);
 fail_led:
+	dell_laptop_unregister_notifier(&dell_laptop_notifier);
 	dell_battery_exit();
 	dell_cleanup_rfkill();
 fail_rfkill:
-- 
2.25.1