ChangeSet 1.1587.12.87, 2004/05/11 14:46:07-07:00, eike-hotplug@sf-tec.de [PATCH] PCI Express, SHPCHP: fix freeing wrong resources drivers/pci/hotplug/pciehp_core.c | 8 ++++---- drivers/pci/hotplug/shpchp_core.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff -Nru a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c --- a/drivers/pci/hotplug/pciehp_core.c Mon May 17 16:57:09 2004 +++ b/drivers/pci/hotplug/pciehp_core.c Mon May 17 16:57:09 2004 @@ -545,10 +545,10 @@ for (loop = 0; loop < 256; loop++) { next = pciehp_slot_list[loop]; while (next != NULL) { - free_pciehp_res(ctrl->io_head); - free_pciehp_res(ctrl->mem_head); - free_pciehp_res(ctrl->p_mem_head); - free_pciehp_res(ctrl->bus_head); + free_pciehp_res(next->io_head); + free_pciehp_res(next->mem_head); + free_pciehp_res(next->p_mem_head); + free_pciehp_res(next->bus_head); TempSlot = next; next = next->next; diff -Nru a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c --- a/drivers/pci/hotplug/shpchp_core.c Mon May 17 16:57:09 2004 +++ b/drivers/pci/hotplug/shpchp_core.c Mon May 17 16:57:09 2004 @@ -541,10 +541,10 @@ for (loop = 0; loop < 256; loop++) { next = shpchp_slot_list[loop]; while (next != NULL) { - free_shpchp_res(ctrl->io_head); - free_shpchp_res(ctrl->mem_head); - free_shpchp_res(ctrl->p_mem_head); - free_shpchp_res(ctrl->bus_head); + free_shpchp_res(next->io_head); + free_shpchp_res(next->mem_head); + free_shpchp_res(next->p_mem_head); + free_shpchp_res(next->bus_head); TempSlot = next; next = next->next;