From: Wang Chen Date: Thu, 22 May 2008 10:07:43 +0000 (+0800) Subject: VIRTIO: Use __skb_queue_purge() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=288369cc2580178ef6ed7c5c63cc1ef08c803250;p=linux-beck.git VIRTIO: Use __skb_queue_purge() Use standard routine for queue purging. Signed-off-by: Wang Chen Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f926b5ab3d09..fe7cdf2a2a23 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);