of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources()
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 11 Feb 2015 04:58:35 +0000 (04:58 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 11 Feb 2015 21:27:15 +0000 (15:27 -0600)
Commit d2be00c0fb5a ("of/pci: Free resources on failure in
of_pci_get_host_bridge_resources()") fixed the error path so it frees
everything on the "resources" list.  That list includes the bus_range, so
we should not free it again.

Remove the superfluous free of bus_range.

[bhelgaas: changelog]
Fixes: d2be00c0fb5a ("of/pci: Free resources on failure in of_pci_get_host_bridge_resources()")
Reported-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Rafael J. Wysocki <rjw@rjwysocki.net>
drivers/of/of_pci.c

index 110fece2ff537238f999cee084451964293bf429..62426d81a4d656c7dfd57c32a6a5bfd15398c6ca 100644 (file)
@@ -229,7 +229,6 @@ parse_failed:
        resource_list_for_each_entry(window, resources)
                kfree(window->res);
        pci_free_resource_list(resources);
-       kfree(bus_range);
        return err;
 }
 EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources);