Skip to contentSkip to conversation

watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()

PATCH New Mark Brown 1 participant 1 message Nov 16, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()

---
 drivers/watchdog/wm831x_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/wm831x_wdt.c +1 -1
index 7be3855..e789a47 100644
@@ -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