mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
943ef2ec4f
commit
f984910085
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user