aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2018-05-31 07:16:32 -0700
committerDavid S. Miller <davem@davemloft.net>2018-06-04 09:33:22 -0400
commit2fa3c8a8b23041490b279d2630f1cfc9fae242fb (patch)
tree22e63448da3a3f17208f0421860f85b676875d1c
parentMerge tag 'wireless-drivers-next-for-davem-2018-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next (diff)
downloadlinux-dev-2fa3c8a8b23041490b279d2630f1cfc9fae242fb.tar.xz
linux-dev-2fa3c8a8b23041490b279d2630f1cfc9fae242fb.zip
net: virtio: simplify the virtnet_find_vqs
Use the common free functions while return successfully. Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/virtio_net.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 2d55e2af7cb6..6d710b8b41c5 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);