Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: histb: Fix error path of histb_pcie_host_enable()

If clk_prepare_enable() call fails on a particular clock, we should not
call clk_disable_unprepare() on this clock, but on the clocks that
succeed from clk_prepare_enable() previously.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

authored by

Shawn Guo and committed by
Lorenzo Pieralisi
db0c25f8 68e7c15c

+3 -4
+3 -4
drivers/pci/dwc/pcie-histb.c
··· 276 276 return 0; 277 277 278 278 err_aux_clk: 279 - clk_disable_unprepare(hipcie->aux_clk); 280 - err_pipe_clk: 281 279 clk_disable_unprepare(hipcie->pipe_clk); 282 - err_sys_clk: 280 + err_pipe_clk: 283 281 clk_disable_unprepare(hipcie->sys_clk); 284 - err_bus_clk: 282 + err_sys_clk: 285 283 clk_disable_unprepare(hipcie->bus_clk); 284 + err_bus_clk: 286 285 287 286 return ret; 288 287 }