Subject: [PATCH 01/11] netpoll: use skb_queue_purge

From: Stephen Hemminger <[email-masked]>
Date: Sat, 03 Nov 2007 11:43:15 -0700

Use standard route for flushing queue.

Signed-off-by: Stephen Hemminger <[email-masked]>

--- a/net/core/netpoll.c	2007-11-03 09:13:16.000000000 -0700
+++ b/net/core/netpoll.c	2007-11-03 09:14:05.000000000 -0700
@@ -816,11 +812,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;
 			}

-- 
Stephen Hemminger <[email-masked]>