summaryrefslogtreecommitdiff
path: root/drivers/watchdog/nuc900_wdt.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-18 10:46:52 +0800
committerWim Van Sebroeck <wim@iguana.be>2012-01-27 09:54:51 +0100
commit2865e770c9dddd40676eadf7c3dfe80aee7628e4 (patch)
tree56e4495c3c6d100daf457918cd389c1043b2633e /drivers/watchdog/nuc900_wdt.c
parente352829a67c1a80c73dfad33ba9dca8ddf2ef0fd (diff)
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@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/nuc900_wdt.c')
-rw-r--r--drivers/watchdog/nuc900_wdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index 2cce8568bd21..529085b8b8fb 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;