summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2018-05-31 17:16:32 +0300
committerDavid S. Miller <davem@davemloft.net>2018-06-04 16:33:22 +0300
commit2fa3c8a8b23041490b279d2630f1cfc9fae242fb (patch)
tree22e63448da3a3f17208f0421860f85b676875d1c /drivers
parentf624434a0ec96ac338f10f3f7f5a2ef287dd597e (diff)
downloadlinux-2fa3c8a8b23041490b279d2630f1cfc9fae242fb.tar.xz
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>
Diffstat (limited to 'drivers')
-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);