[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1326854812.11831.3.camel@phoenix>
Date: Wed, 18 Jan 2012 10:46:52 +0800
From: Axel Lin <axel.lin@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Wan ZongShun <mcuos.com@...il.com>,
Wim Van Sebroeck <wim@...ana.be>,
linux-watchdog@...r.kernel.org
Subject: [PATCH 2/2] watchdog: Return proper error in nuc900wdt_probe if
misc_register fails
Return proper error instead of 0 if misc_register fails
Signed-off-by: Axel Lin <axel.lin@...il.com>
---
drivers/watchdog/nuc900_wdt.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index 2cce856..529085b 100644
--- a/drivers/watchdog/nuc900_wdt.c
+++ b/drivers/watchdog/nuc900_wdt.c
@@ -287,7 +287,8 @@ static int __devinit nuc900wdt_probe(struct platform_device *pdev)
setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0);
- if (misc_register(&nuc900wdt_miscdev)) {
+ ret = misc_register(&nuc900wdt_miscdev);
+ if (ret) {
dev_err(&pdev->dev, "err register miscdev on minor=%d (%d)\n",
WATCHDOG_MINOR, ret);
goto err_clk;
--
1.7.5.4
--
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