Skip to content

Commit

Permalink
VSOCK: Use kvfree()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Michael S. Tsirkin committed Aug 2, 2016
1 parent 4d93824 commit b226aca
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/vhost/vsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b226aca

Please sign in to comment.