From: Amerigo Wang Date: Mon, 10 Dec 2012 02:24:08 +0000 (+0000) Subject: virtio_net: fix a typo in virtnet_alloc_queues() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=008d4278072216bd2459a6e41b07b688fe95ee83;p=deliverable%2Flinux.git virtio_net: fix a typo in virtnet_alloc_queues() Obviously it should check !vi->rq. Reported-by: Fengguang Wu Cc: Jason Wang Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a644eebb31d8..68d64f0313ea 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1347,7 +1347,7 @@ static int virtnet_alloc_queues(struct virtnet_info *vi) if (!vi->sq) goto err_sq; vi->rq = kzalloc(sizeof(*vi->rq) * vi->max_queue_pairs, GFP_KERNEL); - if (!vi->sq) + if (!vi->rq) goto err_rq; INIT_DELAYED_WORK(&vi->refill, refill_work);