Skip to content

Commit

Permalink
of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources()
Browse files Browse the repository at this point in the history
Commit d2be00c ("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: d2be00c ("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>
  • Loading branch information
Lorenzo Pieralisi authored and Bjorn Helgaas committed Feb 11, 2015
1 parent 8729123 commit feb2897
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/of/of_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
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);
Expand Down

0 comments on commit feb2897

Please sign in to comment.