summaryrefslogtreecommitdiff
path: root/drivers/pci/dwc
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2018-03-02 09:12:00 +0800
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-03-07 16:24:27 +0000
commitdb0c25f8aadad8f0be1c6986cf1dcf874d40d79b (patch)
tree0946ad418c46ccefa87255837cddd6f7756d1dfb /drivers/pci/dwc
parent68e7c15ceb8d43dff8a91b6be40beac471a0c48d (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>
Diffstat (limited to 'drivers/pci/dwc')
-rw-r--r--drivers/pci/dwc/pcie-histb.c7
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)
return 0;
err_aux_clk:
- clk_disable_unprepare(hipcie->aux_clk);
-err_pipe_clk:
clk_disable_unprepare(hipcie->pipe_clk);
-err_sys_clk:
+err_pipe_clk:
clk_disable_unprepare(hipcie->sys_clk);
-err_bus_clk:
+err_sys_clk:
clk_disable_unprepare(hipcie->bus_clk);
+err_bus_clk:
return ret;
}