Commit 01372ae1 authored by Guenter Roeck's avatar Guenter Roeck

watchdog: coh901327_wdt: Simplify error handling in probe function

Checking if there is no error followed by a goto if there is one is
confusing. Reverse the logic.
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 0397c5db
...@@ -360,12 +360,10 @@ static int __init coh901327_probe(struct platform_device *pdev) ...@@ -360,12 +360,10 @@ static int __init coh901327_probe(struct platform_device *pdev)
coh901327_wdt.parent = &pdev->dev; coh901327_wdt.parent = &pdev->dev;
ret = watchdog_register_device(&coh901327_wdt); ret = watchdog_register_device(&coh901327_wdt);
if (ret == 0) if (ret)
dev_info(&pdev->dev,
"initialized. timer margin=%d sec\n", margin);
else
goto out_no_wdog; goto out_no_wdog;
dev_info(&pdev->dev, "initialized. timer margin=%d sec\n", margin);
return 0; return 0;
out_no_wdog: out_no_wdog:
......
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