Skip to content

Commit

Permalink
watchdog: Return proper error in nuc900wdt_probe if misc_register fails
Browse files Browse the repository at this point in the history
Return proper error instead of 0 if misc_register fails

Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
  • Loading branch information
AxelLin authored and Wim Van Sebroeck committed Jan 27, 2012
1 parent e352829 commit 2865e77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/watchdog/nuc900_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2865e77

Please sign in to comment.