Message ID | 1355142248-19987-1-git-send-email-amwang@redhat.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Cong Wang <amwang@redhat.com> Date: Mon, 10 Dec 2012 20:24:08 +0800 > Obviously it should check !vi->rq. > > Reported-by: Fengguang Wu <fengguang.wu@intel.com> > Cc: Jason Wang <jasowang@redhat.com> > Cc: David S. Miller <davem@davemloft.net> > Signed-off-by: Cong Wang <amwang@redhat.com> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a644eeb..68d64f0 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);
Obviously it should check !vi->rq. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Jason Wang <jasowang@redhat.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html