1
0
Fork 0

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>
hifive-unleashed-5.1
Shawn Guo 2018-03-02 09:12:00 +08:00 committed by Lorenzo Pieralisi
parent 68e7c15ceb
commit db0c25f8aa
1 changed files with 3 additions and 4 deletions

View 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;
}