Commit 7487257c authored by Junlin Yang's avatar Junlin Yang Committed by Greg Kroah-Hartman

misc: vmw_vmci: return the correct errno code

When kzalloc failed, should return -ENOMEM rather than -EINVAL.
Signed-off-by: default avatarJunlin Yang <yangjunlin@yulong.com>
Link: https://lore.kernel.org/r/20210619112854.1720-1-angkery@163.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 75020f2d
...@@ -107,7 +107,7 @@ struct vmci_ctx *vmci_ctx_create(u32 cid, u32 priv_flags, ...@@ -107,7 +107,7 @@ struct vmci_ctx *vmci_ctx_create(u32 cid, u32 priv_flags,
context = kzalloc(sizeof(*context), GFP_KERNEL); context = kzalloc(sizeof(*context), GFP_KERNEL);
if (!context) { if (!context) {
pr_warn("Failed to allocate memory for VMCI context\n"); pr_warn("Failed to allocate memory for VMCI context\n");
error = -EINVAL; error = -ENOMEM;
goto err_out; goto err_out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment