提交 2865e770 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 e352829a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册