[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:
parent
20de20beba
commit
0adc9add77
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue