Skip to content

Commit

Permalink
usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.
Browse files Browse the repository at this point in the history
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 23, 2008
1 parent 953f551 commit 83bfba5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83bfba5

Please sign in to comment.