提交 f3e2b382 编写于 作者: A Andy Shevchenko 提交者: Pavel Machek

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: NAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
上级 2cbbe9c5
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册