<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">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 &lt; 256; loop++) {
 		next = pciehp_slot_list[loop];
 		while (next != NULL) {
-			free_pciehp_res(ctrl-&gt;io_head);
-			free_pciehp_res(ctrl-&gt;mem_head);
-			free_pciehp_res(ctrl-&gt;p_mem_head);
-			free_pciehp_res(ctrl-&gt;bus_head);
+			free_pciehp_res(next-&gt;io_head);
+			free_pciehp_res(next-&gt;mem_head);
+			free_pciehp_res(next-&gt;p_mem_head);
+			free_pciehp_res(next-&gt;bus_head);
 
 			TempSlot = next;
 			next = next-&gt;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 &lt; 256; loop++) {
 		next = shpchp_slot_list[loop];
 		while (next != NULL) {
-			free_shpchp_res(ctrl-&gt;io_head);
-			free_shpchp_res(ctrl-&gt;mem_head);
-			free_shpchp_res(ctrl-&gt;p_mem_head);
-			free_shpchp_res(ctrl-&gt;bus_head);
+			free_shpchp_res(next-&gt;io_head);
+			free_shpchp_res(next-&gt;mem_head);
+			free_shpchp_res(next-&gt;p_mem_head);
+			free_shpchp_res(next-&gt;bus_head);
 
 			TempSlot = next;
 			next = next-&gt;next;
</pre></body></html>