Skip to content

Commit

Permalink
watchdog: omap_wdt: eliminate goto
Browse files Browse the repository at this point in the history
Eliminate a goto to simplify the code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Aaro Koskinen authored and Wim Van Sebroeck committed Dec 19, 2012
1 parent ef48174 commit 1ba8538
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/watchdog/omap_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ static int omap_wdt_probe(struct platform_device *pdev)
omap_wdt_disable(wdev);

ret = watchdog_register_device(omap_wdt);
if (ret)
goto err_register;
if (ret) {
pm_runtime_disable(wdev->dev);
return ret;
}

pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n",
__raw_readl(wdev->base + OMAP_WATCHDOG_REV) & 0xFF,
Expand All @@ -275,11 +277,6 @@ static int omap_wdt_probe(struct platform_device *pdev)
pm_runtime_put_sync(wdev->dev);

return 0;

err_register:
pm_runtime_disable(wdev->dev);

return ret;
}

static void omap_wdt_shutdown(struct platform_device *pdev)
Expand Down

0 comments on commit 1ba8538

Please sign in to comment.