diff options
Diffstat (limited to 'drivers/pci/hotplug/shpchp_core.c')
-rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index c3fbf3ed351e..3454dc7385f1 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c @@ -178,12 +178,9 @@ error: void cleanup_slots(struct controller *ctrl) { - struct list_head *tmp; - struct list_head *next; - struct slot *slot; + struct slot *slot, *next; - list_for_each_safe(tmp, next, &ctrl->slot_list) { - slot = list_entry(tmp, struct slot, slot_list); + list_for_each_entry_safe(slot, next, &ctrl->slot_list, slot_list) { list_del(&slot->slot_list); cancel_delayed_work(&slot->work); destroy_workqueue(slot->wq); |