From: Stephen Hemminger Date: Tue, 20 Nov 2007 03:15:03 +0000 (-0800) Subject: [NETPOLL]: Use skb_queue_purge(). X-Git-Tag: v2.6.25-rc1~1162^2~1405 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0adc9add7709f87995c003c0ccb085076afdc923;p=linux-2.6 [NETPOLL]: Use skb_queue_purge(). Use standard routine for flushing queue. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/net/core/netpoll.c b/net/core/netpoll.c index c499b5c69b..f63a70be3c 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -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; }