Commit c85c7cde authored by Colin Ian King's avatar Colin Ian King Committed by Pavel Machek

leds: trigger: remove redundant assignment to variable ret

The variable ret is being assigned with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 9af512e8
......@@ -28,7 +28,7 @@ static ssize_t led_delay_on_store(struct device *dev,
{
struct led_classdev *led_cdev = led_trigger_get_led(dev);
unsigned long state;
ssize_t ret = -EINVAL;
ssize_t ret;
ret = kstrtoul(buf, 10, &state);
if (ret)
......@@ -53,7 +53,7 @@ static ssize_t led_delay_off_store(struct device *dev,
{
struct led_classdev *led_cdev = led_trigger_get_led(dev);
unsigned long state;
ssize_t ret = -EINVAL;
ssize_t ret;
ret = kstrtoul(buf, 10, &state);
if (ret)
......
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