leds: flash: Remove redundant initialization of variable ret

Adjust initialization not to trigger Coverity warnings.

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
This commit is contained in:
Pavel Machek 2021-08-16 08:47:08 +02:00
Родитель 9cbc861095
Коммит 654933ae7d
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -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)