PCI: generic: fix missing call of pci_free_resource_list()
authorCyrille Pitchen <cyrille.pitchen@free-electrons.com>
Tue, 30 Jan 2018 20:56:51 +0000 (21:56 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 31 Jan 2018 11:09:42 +0000 (11:09 +0000)
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>
drivers/pci/host/pci-host-common.c

index efd904d93562abef741da4785c09aab19400908f..10e3f5b39499ba9d1918c57824b99bd7c8a3f52a 100644 (file)
@@ -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;
        }