Skip to content

Commit

Permalink
[NETPOLL]: Use skb_queue_purge().
Browse files Browse the repository at this point in the history
Use standard routine for flushing queue.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 28, 2008
1 parent 20de20b commit 0adc9ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,7 @@ void netpoll_cleanup(struct netpoll *np)
cancel_rearming_delayed_work(&npinfo->tx_work);

/* clean after last, unfinished work */
if (!skb_queue_empty(&npinfo->txq)) {
struct sk_buff *skb;
skb = __skb_dequeue(&npinfo->txq);
kfree_skb(skb);
}
__skb_queue_purge(&npinfo->txq);
kfree(npinfo);
np->dev->npinfo = NULL;
}
Expand Down

0 comments on commit 0adc9ad

Please sign in to comment.