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:
parent
75020f2df6
commit
7487257cea
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue