diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-17 21:46:52 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-01-27 03:54:51 -0500 |
commit | 2865e770c9dddd40676eadf7c3dfe80aee7628e4 (patch) | |
tree | 56e4495c3c6d100daf457918cd389c1043b2633e /drivers/watchdog/nuc900_wdt.c | |
parent | e352829a67c1a80c73dfad33ba9dca8ddf2ef0fd (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.c | 3 |
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) | |||
287 | 287 | ||
288 | setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); | 288 | setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); |
289 | 289 | ||
290 | if (misc_register(&nuc900wdt_miscdev)) { | 290 | ret = misc_register(&nuc900wdt_miscdev); |
291 | if (ret) { | ||
291 | dev_err(&pdev->dev, "err register miscdev on minor=%d (%d)\n", | 292 | dev_err(&pdev->dev, "err register miscdev on minor=%d (%d)\n", |
292 | WATCHDOG_MINOR, ret); | 293 | WATCHDOG_MINOR, ret); |
293 | goto err_clk; | 294 | goto err_clk; |