[NETPOLL]: Use skb_queue_purge().

Use standard routine for flushing queue.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stephen Hemminger 2007-11-19 19:15:03 -08:00 committed by David S. Miller
parent 20de20beba
commit 0adc9add77
1 changed files with 1 additions and 5 deletions

View File

@ -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;
}