summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wm831x_wdt.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-16 12:52:12 +0100
committerWim Van Sebroeck <wim@iguana.be>2011-11-16 22:00:10 +0100
commitf9849100851b28c8ad83e86d68d5110497a4e9d6 (patch)
tree59b2eb18141b811dbd5e993d6586293cb7d1e701 /drivers/watchdog/wm831x_wdt.c
parentwatchdog: adx_wdt.c: remove driver (diff)
downloadlinux-f9849100851b28c8ad83e86d68d5110497a4e9d6.tar.xz
linux-f9849100851b28c8ad83e86d68d5110497a4e9d6.zip
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/watchdog/wm831x_wdt.c')
-rw-r--r--drivers/watchdog/wm831x_wdt.c2
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) {