mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
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:
parent
9cbc861095
commit
654933ae7d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user