summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-02-01 11:40:04 -0600
committerBjorn Helgaas <helgaas@kernel.org>2018-02-01 11:40:04 -0600
commit88af81297b602fe300e88b196f663a3fcb6d6dd5 (patch)
tree8b14e8b93df8984257ef6674c1cdc14e6d4074f4 /drivers/pci
parent278a26b6e80417584541f0e4e82634b9b93b5ea2 (diff)
parent83c75ddd816e979802bd244ad494139f28152921 (diff)
Merge remote-tracking branch 'lorenzo/pci/rcar' into next
* lorenzo/pci/rcar: PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pcie-rcar.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 2ef5ff9cddf6..afe7d68dc27e 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -1123,7 +1123,9 @@ static int rcar_pcie_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&pcie->resources);
- rcar_pcie_parse_request_of_pci_ranges(pcie);
+ err = rcar_pcie_parse_request_of_pci_ranges(pcie);
+ if (err)
+ goto err_free_bridge;
err = rcar_pcie_get_resources(pcie);
if (err < 0) {
@@ -1178,6 +1180,7 @@ err_pm_disable:
err_free_resource_list:
pci_free_resource_list(&pcie->resources);
+err_free_bridge:
pci_free_host_bridge(bridge);
return err;