提交 0e7894dc 编写于 作者: A Andy King 提交者: Greg Kroah-Hartman

VMCI: Fix "always true condition"

vmci_send_datagram() returns an int, with negative values indicating failure.
But we store it locally in a u32, which makes comparison of >= 0 useless.
Fixed to use an int.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAndy King <acking@vmware.com>
Signed-off-by: NDmitry Torokhov <dtor@vmware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 32b083a3
......@@ -78,7 +78,7 @@ bool vmci_guest_code_active(void)
u32 vmci_get_vm_context_id(void)
{
if (vm_context_id == VMCI_INVALID_ID) {
u32 result;
int result;
struct vmci_datagram get_cid_msg;
get_cid_msg.dst =
vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册