]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
watchdog: omap_wdt: eliminate goto
authorAaro Koskinen <aaro.koskinen@iki.fi>
Wed, 10 Oct 2012 20:23:37 +0000 (23:23 +0300)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 19 Dec 2012 21:24:57 +0000 (22:24 +0100)
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>
drivers/watchdog/omap_wdt.c

index 1474c2bd3077d908cfe46466fe4709b04909ed6a..34ed61ea02b46c86e348970c4bbd39d3724f320f 100644 (file)
@@ -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)