[IA64-SGI] Small cleanup for misuse of list_for_each to list_for_each_safe.
authorPrarit Bhargava <prarit@sgi.com>
Thu, 9 Feb 2006 22:14:52 +0000 (14:14 -0800)
committerTony Luck <tony.luck@intel.com>
Thu, 9 Feb 2006 22:14:52 +0000 (14:14 -0800)
Patch was suggested by Kenneth W. Chen here

Signed-off-by: Prarit Bhargava <prarit@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/io_init.c

index 2e4e56be8df5cf4d7d6e6e3cfc1a019b344191e9..3437c2390429daff50c60e1700dde33e66645198 100644 (file)
@@ -617,17 +617,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
 void sn_bus_free_sysdata(void)
 {
        struct sysdata_el *element;
-       struct list_head *list;
+       struct list_head *list, *safe;
 
-sn_sysdata_free_start:
-       list_for_each(list, &sn_sysdata_list) {
+       list_for_each_safe(list, safe, &sn_sysdata_list) {
                element = list_entry(list, struct sysdata_el, entry);
                list_del(&element->entry);
                list_del(&(((struct pcidev_info *)
                             (element->sysdata))->pdi_list));
                kfree(element->sysdata);
                kfree(element);
-               goto sn_sysdata_free_start;
        }
        return;
 }