Commit 6d19367b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

leds: lp8860: Remove duplicate NULL checks for gpio_desc

gpiod_*() API check already for the NULL, no need
to repeat that in the driver.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230215170403.84449-2-andriy.shevchenko@linux.intel.com
parent 2956ad80
......@@ -249,7 +249,6 @@ static int lp8860_init(struct lp8860_led *led)
}
}
if (led->enable_gpio)
gpiod_direction_output(led->enable_gpio, 1);
ret = lp8860_fault_check(led);
......@@ -293,7 +292,6 @@ static int lp8860_init(struct lp8860_led *led)
out:
if (ret)
if (led->enable_gpio)
gpiod_direction_output(led->enable_gpio, 0);
if (led->regulator) {
......@@ -448,7 +446,6 @@ static void lp8860_remove(struct i2c_client *client)
struct lp8860_led *led = i2c_get_clientdata(client);
int ret;
if (led->enable_gpio)
gpiod_direction_output(led->enable_gpio, 0);
if (led->regulator) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment