aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wm831x_wdt.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-16 06:52:12 -0500
committerWim Van Sebroeck <wim@iguana.be>2011-11-16 16:00:10 -0500
commitf9849100851b28c8ad83e86d68d5110497a4e9d6 (patch)
tree59b2eb18141b811dbd5e993d6586293cb7d1e701 /drivers/watchdog/wm831x_wdt.c
parent943ef2ec4f5f14940ea391d25bf93eb99eb2ff2a (diff)
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,
150 if (wm831x_wdt_cfgs[i].time == timeout) 150 if (wm831x_wdt_cfgs[i].time == timeout)
151 break; 151 break;
152 if (i == ARRAY_SIZE(wm831x_wdt_cfgs)) 152 if (i == ARRAY_SIZE(wm831x_wdt_cfgs))
153 ret = -EINVAL; 153 return -EINVAL;
154 154
155 ret = wm831x_reg_unlock(wm831x); 155 ret = wm831x_reg_unlock(wm831x);
156 if (ret == 0) { 156 if (ret == 0) {