Subject: [PATCH 1/2] VIRTIO: Use __skb_queue_purge()

From: Wang Chen <[email-masked]>
Date: Thu, 22 May 2008 18:07:43 +0800

Use standard routine for queue purging.

Signed-off-by: Wang Chen <[email-masked]>
---
 drivers/net/virtio_net.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f926b5a..fe7cdf2 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -470,8 +470,7 @@ static void virtnet_remove(struct virtio_device *vdev)
 		kfree_skb(skb);
 		vi->num--;
 	}
-	while ((skb = __skb_dequeue(&vi->send)) != NULL)
-		kfree_skb(skb);
+	__skb_queue_purge(&vi->send);
 
 	BUG_ON(vi->num != 0);
 
-- 
1.5.4.rc3