[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1321444332-304-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Wed, 16 Nov 2011 11:52:12 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Wim Van Sebroeck <wim@...ana.be>
Cc: Dan Carpenter <dan.carpenter@...cle.com>,
linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH] watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Mark Brown <broonie@...nsource.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists