]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: dwc3: exynos fix axius clock error path to do cleanup
authorShuah Khan <shuahkh@osg.samsung.com>
Tue, 10 Jan 2017 23:05:28 +0000 (16:05 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 12 Jan 2017 08:03:59 +0000 (10:03 +0200)
Axius clock error path returns without disabling clock and suspend clock.
Fix it to disable them before returning error.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/dwc3-exynos.c

index e27899bb57064b94811fae851587b06b743128ff..e956306d9b0f834e52632f09fe2af5f2ae913bc0 100644 (file)
@@ -138,7 +138,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
                exynos->axius_clk = devm_clk_get(dev, "usbdrd30_axius_clk");
                if (IS_ERR(exynos->axius_clk)) {
                        dev_err(dev, "no AXI UpScaler clk specified\n");
-                       return -ENODEV;
+                       ret = -ENODEV;
+                       goto axius_clk_err;
                }
                clk_prepare_enable(exynos->axius_clk);
        } else {
@@ -196,6 +197,7 @@ err3:
        regulator_disable(exynos->vdd33);
 err2:
        clk_disable_unprepare(exynos->axius_clk);
+axius_clk_err:
        clk_disable_unprepare(exynos->susp_clk);
        clk_disable_unprepare(exynos->clk);
        return ret;