diff options
author | Geert Uytterhoeven | 2017-12-07 11:15:20 +0100 |
---|---|---|
committer | Lorenzo Pieralisi | 2017-12-19 11:25:43 +0000 |
commit | 83c75ddd816e979802bd244ad494139f28152921 (patch) | |
tree | 3238f78353af3a272f42518a6aa387e57813f7de /drivers/pci/host | |
parent | 1291a0d5049dbc06baaaf66a9ff3f53db493b19b (diff) |
PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures
rcar_pcie_parse_request_of_pci_ranges() can fail and return an error
code, but this is not checked nor handled.
Fix this by adding the missing error handling.
Fixes: 5d2917d469faab72 ("PCI: rcar: Convert to DT resource parsing API")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r-- | drivers/pci/host/pcie-rcar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 52ab3cb0a0bf..95ca4a1feba4 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; |