misc: vmw_vmci: return the correct errno code

When kzalloc failed, should return -ENOMEM rather than -EINVAL.

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Link: https://lore.kernel.org/r/20210619112854.1720-1-angkery@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Junlin Yang 2021-06-19 19:28:54 +08:00 committed by Greg Kroah-Hartman
parent 75020f2df6
commit 7487257cea
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ struct vmci_ctx *vmci_ctx_create(u32 cid, u32 priv_flags,
context = kzalloc(sizeof(*context), GFP_KERNEL);
if (!context) {
pr_warn("Failed to allocate memory for VMCI context\n");
error = -EINVAL;
error = -ENOMEM;
goto err_out;
}