diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2021-05-10 12:50:29 +0300 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2021-05-28 12:00:01 +0200 |
commit | f3e2b3825ffb034b001fbe283d7a32a56e41aca7 (patch) | |
tree | 4d315881247fc1175ec2ed8105c73b3f1c048faf /drivers | |
parent | 2cbbe9c50d13b6417e0baf8e8475ed73d4d12c2d (diff) |
leds: lgm-sso: Drop duplicate NULL check for GPIO operations
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/leds/blink/leds-lgm-sso.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/blink/leds-lgm-sso.c b/drivers/leds/blink/leds-lgm-sso.c index 0b5e19904fa4..885e1277cbbd 100644 --- a/drivers/leds/blink/leds-lgm-sso.c +++ b/drivers/leds/blink/leds-lgm-sso.c @@ -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); } |