diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c index d0fc4fd212e6814ae1ce4f6c852ac30f5e8ec137..40db9f70148f4b1035861a416224d4b1606bf816 100644 --- a/drivers/misc/asus-laptop.c +++ b/drivers/misc/asus-laptop.c @@ -1072,7 +1072,8 @@ static void asus_backlight_exit(void) } #define ASUS_LED_UNREGISTER(object) \ - led_classdev_unregister(&object##_led) + if (object##_led.dev) \ + led_classdev_unregister(&object##_led) static void asus_led_exit(void) {