diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-16 11:52:12 (GMT) |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2011-11-16 21:00:10 (GMT) |
commit | f9849100851b28c8ad83e86d68d5110497a4e9d6 (patch) | |
tree | 59b2eb18141b811dbd5e993d6586293cb7d1e701 /drivers | |
parent | 943ef2ec4f5f14940ea391d25bf93eb99eb2ff2a (diff) | |
download | linux-f9849100851b28c8ad83e86d68d5110497a4e9d6.tar.xz |
watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/wm831x_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c index 7be3855..e789a47 100644 --- a/drivers/watchdog/wm831x_wdt.c +++ b/drivers/watchdog/wm831x_wdt.c @@ -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) { |