[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
|
@ -816,11 +816,7 @@ void netpoll_cleanup(struct netpoll *np)
|
||||||
cancel_rearming_delayed_work(&npinfo->tx_work);
|
cancel_rearming_delayed_work(&npinfo->tx_work);
|
||||||
|
|
||||||
/* clean after last, unfinished work */
|
/* clean after last, unfinished work */
|
||||||
if (!skb_queue_empty(&npinfo->txq)) {
|
__skb_queue_purge(&npinfo->txq);
|
||||||
struct sk_buff *skb;
|
|
||||||
skb = __skb_dequeue(&npinfo->txq);
|
|
||||||
kfree_skb(skb);
|
|
||||||
}
|
|
||||||
kfree(npinfo);
|
kfree(npinfo);
|
||||||
np->dev->npinfo = NULL;
|
np->dev->npinfo = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue