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>
This commit is contained in:
Andy Shevchenko 2021-05-10 12:50:29 +03:00 committed by Pavel Machek
parent 2cbbe9c50d
commit f3e2b3825f
1 changed files with 1 additions and 1 deletions

View 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);
}