summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/vsock.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-02 13:50:42 +0000
committerMichael S. Tsirkin <mst@redhat.com>2016-08-02 16:56:08 +0300
commitb226acab2f6aaa45c2af27279b63f622b23a44bd (patch)
tree03404b1c9574dcf9f78fc08822ae57636c56c894 /drivers/vhost/vsock.c
parent4d93824561057d54712066544609dfc7453b210f (diff)
downloadlinux-b226acab2f6aaa45c2af27279b63f622b23a44bd.tar.gz
linux-b226acab2f6aaa45c2af27279b63f622b23a44bd.tar.bz2
linux-b226acab2f6aaa45c2af27279b63f622b23a44bd.zip
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>
Diffstat (limited to 'drivers/vhost/vsock.c')
-rw-r--r--drivers/vhost/vsock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 028ca16c2d36..0ddf3a2dbfc4 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -434,10 +434,7 @@ err:
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)