Commit 2865e770 authored by Axel Lin's avatar Axel Lin Committed by Wim Van Sebroeck

watchdog: Return proper error in nuc900wdt_probe if misc_register fails

Return proper error instead of 0 if misc_register fails
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent e352829a
...@@ -287,7 +287,8 @@ static int __devinit nuc900wdt_probe(struct platform_device *pdev) ...@@ -287,7 +287,8 @@ static int __devinit nuc900wdt_probe(struct platform_device *pdev)
setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); 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", dev_err(&pdev->dev, "err register miscdev on minor=%d (%d)\n",
WATCHDOG_MINOR, ret); WATCHDOG_MINOR, ret);
goto err_clk; goto err_clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment