diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-16 11:52:12 +0000 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2011-11-16 22:00:10 +0100 |
commit | f9849100851b28c8ad83e86d68d5110497a4e9d6 (patch) | |
tree | 59b2eb18141b811dbd5e993d6586293cb7d1e701 /drivers | |
parent | 943ef2ec4f5f14940ea391d25bf93eb99eb2ff2a (diff) | |
download | linux-f9849100851b28c8ad83e86d68d5110497a4e9d6.tar.bz2 |
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 7be38556aed0..e789a47db41f 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) { |