diff options
author | Prarit Bhargava <prarit@sgi.com> | 2006-02-09 17:14:52 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-02-09 17:14:52 -0500 |
commit | b6bb761897d3b0225fa9d61fc4782b02bab9a6e1 (patch) | |
tree | 79e3ace3f1bf58f52d635ccee3d27866678d5ce4 /arch/ia64 | |
parent | 8b34ff427d6f3b0a1207829350b9db16376f88c5 (diff) |
[IA64-SGI] Small cleanup for misuse of list_for_each to list_for_each_safe.
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>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 2e4e56be8df5..3437c2390429 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -617,17 +617,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev) | |||
617 | void sn_bus_free_sysdata(void) | 617 | void sn_bus_free_sysdata(void) |
618 | { | 618 | { |
619 | struct sysdata_el *element; | 619 | struct sysdata_el *element; |
620 | struct list_head *list; | 620 | struct list_head *list, *safe; |
621 | 621 | ||
622 | sn_sysdata_free_start: | 622 | list_for_each_safe(list, safe, &sn_sysdata_list) { |
623 | list_for_each(list, &sn_sysdata_list) { | ||
624 | element = list_entry(list, struct sysdata_el, entry); | 623 | element = list_entry(list, struct sysdata_el, entry); |
625 | list_del(&element->entry); | 624 | list_del(&element->entry); |
626 | list_del(&(((struct pcidev_info *) | 625 | list_del(&(((struct pcidev_info *) |
627 | (element->sysdata))->pdi_list)); | 626 | (element->sysdata))->pdi_list)); |
628 | kfree(element->sysdata); | 627 | kfree(element->sysdata); |
629 | kfree(element); | 628 | kfree(element); |
630 | goto sn_sysdata_free_start; | ||
631 | } | 629 | } |
632 | return; | 630 | return; |
633 | } | 631 | } |