PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure

If clk_prepare_enable() fails, we must not call clk_disable_unprepare() in
the error path.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Geert Uytterhoeven 2016-08-31 11:28:22 +02:00 committed by Bjorn Helgaas
parent 51afa3cc2d
commit 3d664b070c
1 changed files with 2 additions and 2 deletions

View File

@ -786,7 +786,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
}
err = clk_prepare_enable(pcie->clk);
if (err)
goto fail_clk;
return err;
pcie->bus_clk = devm_clk_get(&pdev->dev, "pcie_bus");
if (IS_ERR(pcie->bus_clk)) {
@ -796,7 +796,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
}
err = clk_prepare_enable(pcie->bus_clk);
if (err)
goto err_map_reg;
goto fail_clk;
i = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (!i) {