Commit 654933ae authored by Pavel Machek's avatar Pavel Machek

leds: flash: Remove redundant initialization of variable ret

Adjust initialization not to trigger Coverity warnings.
Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 9cbc8610
......@@ -92,14 +92,12 @@ static ssize_t flash_strobe_store(struct device *dev,
struct led_classdev *led_cdev = dev_get_drvdata(dev);
struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev);
unsigned long state;
ssize_t ret = -EINVAL;
ssize_t ret = -EBUSY;
mutex_lock(&led_cdev->led_access);
if (led_sysfs_is_disabled(led_cdev)) {
ret = -EBUSY;
if (led_sysfs_is_disabled(led_cdev))
goto unlock;
}
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