Skip to content

Commit

Permalink
watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
Browse files Browse the repository at this point in the history
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Mark Brown authored and Wim Van Sebroeck committed Nov 16, 2011
1 parent 943ef2e commit f984910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/wm831x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int wm831x_wdt_set_timeout(struct watchdog_device *wdt_dev,
if (wm831x_wdt_cfgs[i].time == timeout)
break;
if (i == ARRAY_SIZE(wm831x_wdt_cfgs))
ret = -EINVAL;
return -EINVAL;

ret = wm831x_reg_unlock(wm831x);
if (ret == 0) {
Expand Down

0 comments on commit f984910

Please sign in to comment.