diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2017-01-10 16:05:28 -0700 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-06-25 22:02:22 -0400 |
commit | d490b0caf87fa4d743b6cc2c00a16aa1f84d2c74 (patch) | |
tree | 22d51eb1097bf7b051efe88190ed521973acb388 | |
parent | 61e04a644bd8f083e8c6354dae187a672b0e8f90 (diff) |
usb: dwc3: exynos fix axius clock error path to do cleanup
[ Upstream commit 8ae584d1951f241efd45499f8774fd7066f22823 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r-- | drivers/usb/dwc3/dwc3-exynos.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index 0a465a90f0d6..5932205f551e 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -148,7 +148,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 { @@ -206,6 +207,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; |