Skip to content

Commit

Permalink
platform/x86: eeepc-laptop: Drop duplicate check for led_classdev_unr…
Browse files Browse the repository at this point in the history
…egister()

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>
  • Loading branch information
Andy Shevchenko committed May 7, 2020
1 parent 2225dba commit e257dd3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*/
Expand Down

0 comments on commit e257dd3

Please sign in to comment.