mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 07:22:34 +00:00
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: 4de7255f7d ("vhost: extend memory regions allocation to vmalloc")
Spotted-by: Dan Carpenter <[email protected]>
Suggested-by: Julia Lawall <[email protected]>
Signed-off-by: Igor Mammedov <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>