mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
@ 2011-11-16 11:52 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2011-11-16 11:52 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: Dan Carpenter, linux-kernel, linux-watchdog, Mark Brown

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/watchdog/wm831x_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c
index 7be3855..e789a47 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) {
-- 
1.7.7.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-16 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 11:52 [PATCH] watchdog: Don't overwrite error value in wm831x_wdt_set_timeout() Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome