From b226acab2f6aaa45c2af27279b63f622b23a44bd Mon Sep 17 00:00:00 2001 From: Wei Yongjun <weiyj.lk@gmail.com> Date: Tue, 2 Aug 2016 13:50:42 +0000 Subject: [PATCH] VSOCK: Use kvfree() Use kvfree() instead of open-coding it. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- drivers/vhost/vsock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 028ca16c2d36e..0ddf3a2dbfc49 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -434,10 +434,7 @@ static int vhost_vsock_stop(struct vhost_vsock *vsock) static void vhost_vsock_free(struct vhost_vsock *vsock) { - if (is_vmalloc_addr(vsock)) - vfree(vsock); - else - kfree(vsock); + kvfree(vsock); } static int vhost_vsock_dev_open(struct inode *inode, struct file *file) -- GitLab