netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: virtio: simplify the virtnet_find_vqs
@ 2018-05-31 14:16 Tonghao Zhang
  2018-06-04 13:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tonghao Zhang @ 2018-05-31 14:16 UTC (permalink / raw)
  To: netdev; +Cc: Tonghao Zhang

Use the common free functions while return successfully.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 drivers/net/virtio_net.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 8f08a3e..0eee6d6 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2609,12 +2609,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
 		vi->sq[i].vq = vqs[txq2vq(i)];
 	}
 
-	kfree(names);
-	kfree(callbacks);
-	kfree(vqs);
-	kfree(ctx);
+	/* run here: ret == 0. */
 
-	return 0;
 
 err_find:
 	kfree(ctx);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-04 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-31 14:16 [PATCH] net: virtio: simplify the virtnet_find_vqs Tonghao Zhang
2018-06-04 13:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).