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>
This commit is contained in:
parent
2062cc20d0
commit
008d427807
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue