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

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.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 75020f2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}