diff options
author | Tonghao Zhang <xiangxia.m.yue@gmail.com> | 2018-05-31 07:16:32 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-04 09:33:22 -0400 |
commit | 2fa3c8a8b23041490b279d2630f1cfc9fae242fb (patch) | |
tree | 22e63448da3a3f17208f0421860f85b676875d1c /drivers/net/virtio_net.c | |
parent | f624434a0ec96ac338f10f3f7f5a2ef287dd597e (diff) | |
download | linux-stable-2fa3c8a8b23041490b279d2630f1cfc9fae242fb.tar.gz linux-stable-2fa3c8a8b23041490b279d2630f1cfc9fae242fb.tar.bz2 linux-stable-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>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 6 |
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); |