diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-08-02 09:50:42 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-08-02 09:56:08 -0400 |
commit | b226acab2f6aaa45c2af27279b63f622b23a44bd (patch) | |
tree | 03404b1c9574dcf9f78fc08822ae57636c56c894 /drivers/vhost/vsock.c | |
parent | 4d93824561057d54712066544609dfc7453b210f (diff) |
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.c | 5 |
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: | |||
434 | 434 | ||
435 | static void vhost_vsock_free(struct vhost_vsock *vsock) | 435 | static void vhost_vsock_free(struct vhost_vsock *vsock) |
436 | { | 436 | { |
437 | if (is_vmalloc_addr(vsock)) | 437 | kvfree(vsock); |
438 | vfree(vsock); | ||
439 | else | ||
440 | kfree(vsock); | ||
441 | } | 438 | } |
442 | 439 | ||
443 | static int vhost_vsock_dev_open(struct inode *inode, struct file *file) | 440 | static int vhost_vsock_dev_open(struct inode *inode, struct file *file) |