summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2012-10-10 22:23:37 +0200
committerWim Van Sebroeck <wim@iguana.be>2012-12-19 22:24:57 +0100
commit1ba85387f0224dca9f0f9d783b09c9ceeb1c91bd (patch)
tree0d2d614307e0ab7499debee04699d8a9e60377b8 /drivers/watchdog
parentwatchdog: omap_wdt: delete redundant platform_set_drvdata() calls (diff)
downloadlinux-1ba85387f0224dca9f0f9d783b09c9ceeb1c91bd.tar.xz
linux-1ba85387f0224dca9f0f9d783b09c9ceeb1c91bd.zip
watchdog: omap_wdt: eliminate goto
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>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/omap_wdt.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1474c2bd3077..34ed61ea02b4 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -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,
@@ -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)