Skip to content

Commit

Permalink
virtio_net: fix a typo in virtnet_alloc_queues()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amerigo Wang authored and David S. Miller committed Dec 10, 2012
1 parent 2062cc2 commit 008d427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 008d427

Please sign in to comment.