提交 2fa3c8a8 编写于 作者: T Tonghao Zhang 提交者: David S. Miller

net: virtio: simplify the virtnet_find_vqs

Use the common free functions while return successfully.
Signed-off-by: NTonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f624434a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册