[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1527776192-26928-1-git-send-email-xiangxia.m.yue@gmail.com>
Date: Thu, 31 May 2018 07:16:32 -0700
From: Tonghao Zhang <xiangxia.m.yue@...il.com>
To: netdev@...r.kernel.org
Cc: Tonghao Zhang <xiangxia.m.yue@...il.com>
Subject: [PATCH] net: virtio: simplify the virtnet_find_vqs
Use the common free functions while return successfully.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@...il.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
Powered by blists - more mailing lists