vhost: fix error handling for memory region alloc
callers of vhost_kvzalloc() expect the same behaviour on allocation error as from kmalloc/vmalloc i.e. NULL return value. So just return vzmalloc() returned value instead of returning ERR_PTR(-ENOMEM) Fixes: 4de7255f ("vhost: extend memory regions allocation to vmalloc") Spotted-by:Dan Carpenter <dan.carpenter@oracle.com> Suggested-by:
Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
Showing
Please register or sign in to comment