Commit 83bfba5f authored by David S. Miller's avatar David S. Miller

usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 953f5517
...@@ -512,14 +512,13 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q) ...@@ -512,14 +512,13 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
int count = 0; int count = 0;
spin_lock_irqsave (&q->lock, flags); 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 skb_data *entry;
struct urb *urb; struct urb *urb;
int retval; int retval;
entry = (struct skb_data *) skb->cb; entry = (struct skb_data *) skb->cb;
urb = entry->urb; urb = entry->urb;
skbnext = skb->next;
// during some PM-driven resume scenarios, // during some PM-driven resume scenarios,
// these (async) unlinks complete immediately // these (async) unlinks complete immediately
......
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