watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
Subsystems (2)
PATCH 1/1 watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- drivers/watchdog/wm831x_wdt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/wm831x_wdt.c +1 -1
@@ -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 ) {
Signature · 1 line
1.7.7.2