From f3e2b3825ffb034b001fbe283d7a32a56e41aca7 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 10 May 2021 12:50:29 +0300 Subject: [PATCH] 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 --- drivers/leds/blink/leds-lgm-sso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2