mirror of https://gitee.com/openkylin/linux.git
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:
parent
2cbbe9c50d
commit
f3e2b3825f
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue