From: Amerigo Wang <amwang@redhat.com> Date: Mon, 10 Dec 2012 02:24:08 +0000 (+0000) Subject: virtio_net: fix a typo in virtnet_alloc_queues() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=008d4278072216bd2459a6e41b07b688fe95ee83;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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> --- 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);