]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: histb: Fix error path of histb_pcie_host_enable()
authorShawn Guo <shawn.guo@linaro.org>
Fri, 2 Mar 2018 01:12:00 +0000 (09:12 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 7 Mar 2018 16:24:27 +0000 (16:24 +0000)
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>
drivers/pci/dwc/pcie-histb.c

index 70b5c0b108bfb481633797564da2ce2824e4aece..17ed604f57410c45e08fcc0785d3d557cd0dbd0d 100644 (file)
@@ -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;
 }