From: Andy Shevchenko Date: Mon, 10 May 2021 09:50:29 +0000 (+0300) Subject: leds: lgm-sso: Drop duplicate NULL check for GPIO operations X-Git-Tag: v5.14-rc1~87^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3e2b3825ffb034b001fbe283d7a32a56e41aca7;p=thirdparty%2Fkernel%2Flinux.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 Signed-off-by: Pavel Machek --- diff --git a/drivers/leds/blink/leds-lgm-sso.c b/drivers/leds/blink/leds-lgm-sso.c index 0b5e19904fa46..885e1277cbbd7 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); }