Skip to content

Commit

Permalink
PCI: generic: fix missing call of pci_free_resource_list()
Browse files Browse the repository at this point in the history
Call pci_free_resource_list() from pci_host_common_probe() when probing
fails, as done inside gen_pci_init() when this later function fails.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@free-electrons.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
  • Loading branch information
Cyrille Pitchen authored and Lorenzo Pieralisi committed Jan 31, 2018
1 parent 3a8f77e commit c6dd8ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pci/host/pci-host-common.c
Original file line number Diff line number Diff line change
@@ -110,6 +110,7 @@ int pci_host_common_probe(struct platform_device *pdev,
ret = pci_scan_root_bus_bridge(bridge);
if (ret < 0) {
dev_err(dev, "Scanning root bridge failed");
pci_free_resource_list(&resources);
return ret;
}

0 comments on commit c6dd8ec

Please sign in to comment.