summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-05-07 19:37:23 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-05-07 20:14:24 +0300
commita87406c554d11e8ec4830cc5d646c7d4df71eb0b (patch)
treea6cf5ab60f47215504b5d8bd6c3f0024932bfe23 /drivers/platform
parent410a772419bf7d5641ecb7c75a91d9768be2dbdb (diff)
downloadlinux-stable-a87406c554d11e8ec4830cc5d646c7d4df71eb0b.tar.gz
linux-stable-a87406c554d11e8ec4830cc5d646c7d4df71eb0b.tar.bz2
linux-stable-a87406c554d11e8ec4830cc5d646c7d4df71eb0b.zip
platform/x86: samsung-laptop: Drop duplicate check for led_classdev_unregister()
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/samsung-laptop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 23e40aa2176e..d5cec6e35bb8 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -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);
}