summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-05-22 12:07:43 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-05-22 20:01:02 +0200
commit288369cc2580178ef6ed7c5c63cc1ef08c803250 (patch)
treec5537f4209554817e5db1efd0435fb9ca631618a /drivers
parentphylib: do EXPORT_SYMBOL on get_phy_id (diff)
downloadlinux-288369cc2580178ef6ed7c5c63cc1ef08c803250.tar.xz
linux-288369cc2580178ef6ed7c5c63cc1ef08c803250.zip
VIRTIO: Use __skb_queue_purge()
Use standard routine for queue purging. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/virtio_net.c3
1 files changed, 1 insertions, 2 deletions
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);