Просмотр исходного кода

Merge branch 'pci/host-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci into acpi-resources

modified:   drivers/of/of_pci.c

This fixes a build failure after merging the 'acpi-resources' branch
with the PCI tree caused by bad interactions between that branch and
the only commit in 'pci/host-generic'.  Also that commit contains a
bug which can be fixed by removing one line of code, so do that too.

Link: http://marc.info/?l=linux-kernel&m=142344882101429&w=2
Link: http://marc.info/?l=linux-next&m=142346304003932&w=2
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Rafael J. Wysocki 11 лет назад
Родитель
Сommit
5c493df25a
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      drivers/of/of_pci.c

+ 3 - 0
drivers/of/of_pci.c

@@ -140,6 +140,7 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
 			unsigned char busno, unsigned char bus_max,
 			unsigned char busno, unsigned char bus_max,
 			struct list_head *resources, resource_size_t *io_base)
 			struct list_head *resources, resource_size_t *io_base)
 {
 {
+	struct resource_entry *window;
 	struct resource *res;
 	struct resource *res;
 	struct resource *bus_range;
 	struct resource *bus_range;
 	struct of_pci_range range;
 	struct of_pci_range range;
@@ -225,6 +226,8 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
 conversion_failed:
 conversion_failed:
 	kfree(res);
 	kfree(res);
 parse_failed:
 parse_failed:
+	resource_list_for_each_entry(window, resources)
+		kfree(window->res);
 	pci_free_resource_list(resources);
 	pci_free_resource_list(resources);
 	return err;
 	return err;
 }
 }