Commit b6bb7618 authored by Prarit Bhargava's avatar Prarit Bhargava Committed by Tony Luck

[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: default avatarPrarit Bhargava <prarit@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 8b34ff42
...@@ -617,17 +617,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev) ...@@ -617,17 +617,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
void sn_bus_free_sysdata(void) void sn_bus_free_sysdata(void)
{ {
struct sysdata_el *element; struct sysdata_el *element;
struct list_head *list; struct list_head *list, *safe;
sn_sysdata_free_start: list_for_each_safe(list, safe, &sn_sysdata_list) {
list_for_each(list, &sn_sysdata_list) {
element = list_entry(list, struct sysdata_el, entry); element = list_entry(list, struct sysdata_el, entry);
list_del(&element->entry); list_del(&element->entry);
list_del(&(((struct pcidev_info *) list_del(&(((struct pcidev_info *)
(element->sysdata))->pdi_list)); (element->sysdata))->pdi_list));
kfree(element->sysdata); kfree(element->sysdata);
kfree(element); kfree(element);
goto sn_sysdata_free_start;
} }
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment