Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c749bcc1 authored by Lorenzo Pieralisi's avatar Lorenzo Pieralisi Committed by Alex Shi
Browse files

of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources()



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: default avatarJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
CC: Rafael J. Wysocki <rjw@rjwysocki.net>
(cherry picked from commit feb28979c137ba3f649ad36fc27c85c64c111f78)

Signed-off-by: default avatarAlex Shi <alex.shi@linaro.org>
parent 2bab01c9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ parse_failed:
	list_for_each_entry(window, resources, list)
		kfree(window->res);
	pci_free_resource_list(resources);
	kfree(bus_range);
	return err;
}
EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources);