summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-20 23:12:29 +0100
committerPavel Machek <pavel@ucw.cz>2020-04-27 14:13:12 +0200
commitc85c7cdef3c906d316bf04c0e452d45cf9452c67 (patch)
treeda92a2212c42f12f52f2d36c7b988f86c4561687 /drivers/leds
parent9af512e81964a1b9a6ac7ae9b24507f99e557c36 (diff)
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>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/trigger/ledtrig-timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/trigger/ledtrig-timer.c b/drivers/leds/trigger/ledtrig-timer.c
index 34a68604c46c..b4688d1d9d2b 100644
--- a/drivers/leds/trigger/ledtrig-timer.c
+++ b/drivers/leds/trigger/ledtrig-timer.c
@@ -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)