Commit 3d664b07 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Bjorn Helgaas

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 51afa3cc
...@@ -786,7 +786,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev, ...@@ -786,7 +786,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
} }
err = clk_prepare_enable(pcie->clk); err = clk_prepare_enable(pcie->clk);
if (err) if (err)
goto fail_clk; return err;
pcie->bus_clk = devm_clk_get(&pdev->dev, "pcie_bus"); pcie->bus_clk = devm_clk_get(&pdev->dev, "pcie_bus");
if (IS_ERR(pcie->bus_clk)) { if (IS_ERR(pcie->bus_clk)) {
...@@ -796,7 +796,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev, ...@@ -796,7 +796,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
} }
err = clk_prepare_enable(pcie->bus_clk); err = clk_prepare_enable(pcie->bus_clk);
if (err) if (err)
goto err_map_reg; goto fail_clk;
i = irq_of_parse_and_map(pdev->dev.of_node, 0); i = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (!i) { if (!i) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment