]> git.baikalelectronics.ru Git - kernel.git/commitdiff
platform/x86: eeepc-laptop: Drop duplicate check for led_classdev_unregister()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 7 May 2020 16:37:23 +0000 (19:37 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 7 May 2020 16:39:32 +0000 (19:39 +0300)
led_classdev_unregister() already has the very same check, so,
drop a duplicate in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/eeepc-laptop.c

index 776868d5e45805f69f2d92bec9daa992971b94d1..ba08c9235f769652fff9d7ee9a8ce73905aa15a2 100644 (file)
@@ -541,13 +541,11 @@ static int eeepc_led_init(struct eeepc_laptop *eeepc)
 
 static void eeepc_led_exit(struct eeepc_laptop *eeepc)
 {
-       if (!IS_ERR_OR_NULL(eeepc->tpd_led.dev))
-               led_classdev_unregister(&eeepc->tpd_led);
+       led_classdev_unregister(&eeepc->tpd_led);
        if (eeepc->led_workqueue)
                destroy_workqueue(eeepc->led_workqueue);
 }
 
-
 /*
  * PCI hotplug (for wlan rfkill)
  */