1
0
Fork 0

virtio_net: fix a typo in virtnet_alloc_queues()

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>
hifive-unleashed-5.1
Amerigo Wang 2012-12-10 02:24:08 +00:00 committed by David S. Miller
parent 2062cc20d0
commit 008d427807
1 changed files with 1 additions and 1 deletions

View File

@ -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);