mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
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>
This commit is contained in:
parent
f624434a0e
commit
2fa3c8a8b2
1 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue