Commit 22921a9e authored by Shuah Khan's avatar Shuah Khan Committed by Greg Kroah-Hartman

usb: dwc3: exynos fix axius clock error path to do cleanup

commit 8ae584d1 upstream.

Axius clock error path returns without disabling clock and suspend clock.
Fix it to disable them before returning error.
Reviewed-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0ee203c
...@@ -148,7 +148,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -148,7 +148,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
exynos->axius_clk = devm_clk_get(dev, "usbdrd30_axius_clk"); exynos->axius_clk = devm_clk_get(dev, "usbdrd30_axius_clk");
if (IS_ERR(exynos->axius_clk)) { if (IS_ERR(exynos->axius_clk)) {
dev_err(dev, "no AXI UpScaler clk specified\n"); dev_err(dev, "no AXI UpScaler clk specified\n");
return -ENODEV; ret = -ENODEV;
goto axius_clk_err;
} }
clk_prepare_enable(exynos->axius_clk); clk_prepare_enable(exynos->axius_clk);
} else { } else {
...@@ -206,6 +207,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -206,6 +207,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
regulator_disable(exynos->vdd33); regulator_disable(exynos->vdd33);
err2: err2:
clk_disable_unprepare(exynos->axius_clk); clk_disable_unprepare(exynos->axius_clk);
axius_clk_err:
clk_disable_unprepare(exynos->susp_clk); clk_disable_unprepare(exynos->susp_clk);
clk_disable_unprepare(exynos->clk); clk_disable_unprepare(exynos->clk);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment