Skip to contentSkip to conversation

virtio_net: fix a typo in virtnet_alloc_queues()

PATCH Applied Cong Wang 2 participants 2 messages Dec 10, 2012

Subsystems (3)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 virtio_net: fix a typo in virtnet_alloc_queues()

Obviously it should check !vi->rq.

---

drivers/net/virtio_net.c +1 -1
index a644eeb..68d64f0 100644
@@ -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);