aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-wmi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 95cba9ebf6c0..d1049ee3c9e8 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -453,7 +453,9 @@ static enum led_brightness kbd_led_get(struct led_classdev *led_cdev)
453 453
454static void asus_wmi_led_exit(struct asus_wmi *asus) 454static void asus_wmi_led_exit(struct asus_wmi *asus)
455{ 455{
456 if (asus->tpd_led.dev) 456 if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
457 led_classdev_unregister(&asus->kbd_led);
458 if (!IS_ERR_OR_NULL(asus->tpd_led.dev))
457 led_classdev_unregister(&asus->tpd_led); 459 led_classdev_unregister(&asus->tpd_led);
458 if (asus->led_workqueue) 460 if (asus->led_workqueue)
459 destroy_workqueue(asus->led_workqueue); 461 destroy_workqueue(asus->led_workqueue);