diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2018-03-01 20:12:00 -0500 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2018-03-07 11:24:27 -0500 |
commit | db0c25f8aadad8f0be1c6986cf1dcf874d40d79b (patch) | |
tree | 0946ad418c46ccefa87255837cddd6f7756d1dfb | |
parent | 68e7c15ceb8d43dff8a91b6be40beac471a0c48d (diff) |
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>
-rw-r--r-- | drivers/pci/dwc/pcie-histb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pci/dwc/pcie-histb.c b/drivers/pci/dwc/pcie-histb.c index 70b5c0b108bf..17ed604f5741 100644 --- a/drivers/pci/dwc/pcie-histb.c +++ b/drivers/pci/dwc/pcie-histb.c | |||
@@ -276,13 +276,12 @@ static int histb_pcie_host_enable(struct pcie_port *pp) | |||
276 | return 0; | 276 | return 0; |
277 | 277 | ||
278 | err_aux_clk: | 278 | err_aux_clk: |
279 | clk_disable_unprepare(hipcie->aux_clk); | ||
280 | err_pipe_clk: | ||
281 | clk_disable_unprepare(hipcie->pipe_clk); | 279 | clk_disable_unprepare(hipcie->pipe_clk); |
282 | err_sys_clk: | 280 | err_pipe_clk: |
283 | clk_disable_unprepare(hipcie->sys_clk); | 281 | clk_disable_unprepare(hipcie->sys_clk); |
284 | err_bus_clk: | 282 | err_sys_clk: |
285 | clk_disable_unprepare(hipcie->bus_clk); | 283 | clk_disable_unprepare(hipcie->bus_clk); |
284 | err_bus_clk: | ||
286 | 285 | ||
287 | return ret; | 286 | return ret; |
288 | } | 287 | } |