Skip to content

Commit b226aca

Browse files
weiyjmstsirkin
authored andcommitted
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>
1 parent 4d93824 commit b226aca

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/vhost/vsock.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,7 @@ static int vhost_vsock_stop(struct vhost_vsock *vsock)
434434

435435
static void vhost_vsock_free(struct vhost_vsock *vsock)
436436
{
437-
if (is_vmalloc_addr(vsock))
438-
vfree(vsock);
439-
else
440-
kfree(vsock);
437+
kvfree(vsock);
441438
}
442439

443440
static int vhost_vsock_dev_open(struct inode *inode, struct file *file)

0 commit comments

Comments
 (0)