Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fa3c8a8 authored by Tonghao Zhang's avatar Tonghao Zhang Committed by David S. Miller
Browse files

net: virtio: simplify the virtnet_find_vqs



Use the common free functions while return successfully.

Signed-off-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f624434a
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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);