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>
This commit is contained in:
parent
ef48174729
commit
1ba85387f0
1 changed files with 4 additions and 7 deletions
|
@ -265,8 +265,10 @@ static int omap_wdt_probe(struct platform_device *pdev)
|
||||||
omap_wdt_disable(wdev);
|
omap_wdt_disable(wdev);
|
||||||
|
|
||||||
ret = watchdog_register_device(omap_wdt);
|
ret = watchdog_register_device(omap_wdt);
|
||||||
if (ret)
|
if (ret) {
|
||||||
goto err_register;
|
pm_runtime_disable(wdev->dev);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n",
|
pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n",
|
||||||
__raw_readl(wdev->base + OMAP_WATCHDOG_REV) & 0xFF,
|
__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);
|
pm_runtime_put_sync(wdev->dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_register:
|
|
||||||
pm_runtime_disable(wdev->dev);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_wdt_shutdown(struct platform_device *pdev)
|
static void omap_wdt_shutdown(struct platform_device *pdev)
|
||||||
|
|
Loading…
Reference in a new issue