]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.
authorDavid S. Miller <davem@davemloft.net>
Tue, 23 Sep 2008 03:18:47 +0000 (20:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Sep 2008 03:18:47 +0000 (20:18 -0700)
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c

index 8463efb9e0b119417b8199c78c53d6a0151ffe43..02d25c743994e3f5539744587697ae1685187e16 100644 (file)
@@ -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