diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/bus.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 4b0970b46e0b..6241fd05bd41 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -87,11 +87,15 @@ EXPORT_SYMBOL_GPL(pci_bus_resource_n); | |||
87 | void pci_bus_remove_resources(struct pci_bus *bus) | 87 | void pci_bus_remove_resources(struct pci_bus *bus) |
88 | { | 88 | { |
89 | int i; | 89 | int i; |
90 | struct pci_bus_resource *bus_res, *tmp; | ||
90 | 91 | ||
91 | for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) | 92 | for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) |
92 | bus->resource[i] = NULL; | 93 | bus->resource[i] = NULL; |
93 | 94 | ||
94 | pci_free_resource_list(&bus->resources); | 95 | list_for_each_entry_safe(bus_res, tmp, &bus->resources, list) { |
96 | list_del(&bus_res->list); | ||
97 | kfree(bus_res); | ||
98 | } | ||
95 | } | 99 | } |
96 | 100 | ||
97 | /** | 101 | /** |