forked from Minki/linux
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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
This commit is contained in:
parent
9af512e819
commit
c85c7cdef3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user