mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
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>
This commit is contained in:
parent
e352829a67
commit
2865e770c9
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue