From: David S. Miller Date: Tue, 23 Sep 2008 03:18:47 +0000 (-0700) Subject: usbnet: Use skb_queue_walk_safe() instead of by-hand implementation. X-Git-Tag: v2.6.28-rc1~717^2~218 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=83bfba5fca16d040bb78a24148da844db3de6a76;p=~emulex%2Finfiniband.git usbnet: Use skb_queue_walk_safe() instead of by-hand implementation. Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 8463efb9e0b..02d25c74399 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -512,14 +512,13 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q) int count = 0; spin_lock_irqsave (&q->lock, flags); - for (skb = q->next; skb != (struct sk_buff *) q; skb = skbnext) { + skb_queue_walk_safe(q, skb, skbnext) { struct skb_data *entry; struct urb *urb; int retval; entry = (struct skb_data *) skb->cb; urb = entry->urb; - skbnext = skb->next; // during some PM-driven resume scenarios, // these (async) unlinks complete immediately