diff mbox series

[v1,12/28] leds: lgm-sso: Drop duplicate NULL check for GPIO operations

Message ID 20210510095045.3299382-13-andy.shevchenko@gmail.com
State New
Headers show
Series leds: cleanups and fwnode refcounting bug fixes | expand

Commit Message

Andy Shevchenko May 10, 2021, 9:50 a.m. UTC
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>
---
 drivers/leds/blink/leds-lgm-sso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/leds/blink/leds-lgm-sso.c b/drivers/leds/blink/leds-lgm-sso.c
index a7f2e5436ba2..f44d6bf5a5b3 100644
--- a/drivers/leds/blink/leds-lgm-sso.c
+++ b/drivers/leds/blink/leds-lgm-sso.c
@@ -259,7 +259,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);
 }