Skip to content

Commit

Permalink
platform/x86: samsung-laptop: Drop duplicate check for led_classdev_u…
Browse files Browse the repository at this point in the history
…nregister()

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 410a772 commit a87406c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/platform/x86/samsung-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,7 @@ static enum led_brightness kbd_led_get(struct led_classdev *led_cdev)

static void samsung_leds_exit(struct samsung_laptop *samsung)
{
if (!IS_ERR_OR_NULL(samsung->kbd_led.dev))
led_classdev_unregister(&samsung->kbd_led);
led_classdev_unregister(&samsung->kbd_led);
if (samsung->led_workqueue)
destroy_workqueue(samsung->led_workqueue);
}
Expand Down

0 comments on commit a87406c

Please sign in to comment.