Skip to content

Commit 9469538

Browse files
Shuah Khangregkh
authored andcommitted
usb: dwc3: exynos fix axius clock error path to do cleanup
commit 8ae584d1951f241efd45499f8774fd7066f22823 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent aac7fa2 commit 9469538

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/usb/dwc3/dwc3-exynos.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
148148
exynos->axius_clk = devm_clk_get(dev, "usbdrd30_axius_clk");
149149
if (IS_ERR(exynos->axius_clk)) {
150150
dev_err(dev, "no AXI UpScaler clk specified\n");
151-
return -ENODEV;
151+
ret = -ENODEV;
152+
goto axius_clk_err;
152153
}
153154
clk_prepare_enable(exynos->axius_clk);
154155
} else {
@@ -206,6 +207,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
206207
regulator_disable(exynos->vdd33);
207208
err2:
208209
clk_disable_unprepare(exynos->axius_clk);
210+
axius_clk_err:
209211
clk_disable_unprepare(exynos->susp_clk);
210212
clk_disable_unprepare(exynos->clk);
211213
return ret;

0 commit comments

Comments
 (0)