misc: vmw_vmci: return the correct errno code
Subsystems (2)
PATCH 1/1 misc: vmw_vmci: return the correct errno code
From: Junlin Yang <[email protected]>
When kzalloc failed, should return -ENOMEM rather than -EINVAL.
Signed-off-by Junlin Yang <[email protected]>
--- drivers/misc/vmw_vmci/vmci_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/vmw_vmci/vmci_context.c +1 -1
@@ -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; }
Signature · 1 line
1.9.1