leds: lgm-sso: Drop duplicate NULL check for GPIO operations
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 10 May 2021 09:50:29 +0000 (12:50 +0300)
committerPavel Machek <pavel@ucw.cz>
Fri, 28 May 2021 10:00:01 +0000 (12:00 +0200)
Since GPIO operations are NULL-aware, we don't need to duplicate
this check. Remove it and fold the rest of the code.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/blink/leds-lgm-sso.c

index 0b5e199..885e127 100644 (file)
@@ -258,7 +258,7 @@ static void sso_led_brightness_set(struct led_classdev *led_cdev,
                                   1 << desc->pin);
        }
 
-       if (!desc->hw_trig && led->gpiod)
+       if (!desc->hw_trig)
                gpiod_set_value(led->gpiod, val);
 }