diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-11-19 19:15:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:54:16 -0800 |
commit | 0adc9add7709f87995c003c0ccb085076afdc923 (patch) | |
tree | 06524f12a286746a835fe901d7732e5db391a1f0 /net/core | |
parent | 20de20beba6e9bd2e1c83696bfefa3b16cda9a74 (diff) | |
download | linux-3.10-0adc9add7709f87995c003c0ccb085076afdc923.tar.gz linux-3.10-0adc9add7709f87995c003c0ccb085076afdc923.tar.bz2 linux-3.10-0adc9add7709f87995c003c0ccb085076afdc923.zip |
[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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/netpoll.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index c499b5c69be..f63a70be3cd 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; } |