diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2016-08-31 12:28:22 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-13 01:15:09 +0300 |
commit | 3d664b070ccb2b1522174ac36c606f92808a26fa (patch) | |
tree | 409b1d58078b200821ffc1ec2f1f89ad6591ecd7 | |
parent | 51afa3cc2ded60884aed3aaac8d8c416e3cf6324 (diff) | |
download | linux-3d664b070ccb2b1522174ac36c606f92808a26fa.tar.xz |
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>
-rw-r--r-- | drivers/pci/host/pcie-rcar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index e58bbbc0f0b5..45dc3cd74c03 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -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) { |