From 0e7894dc82bd9d4d82c16d16189f58da6d41d018 Mon Sep 17 00:00:00 2001 From: Andy King Date: Thu, 10 Jan 2013 15:41:41 -0800 Subject: [PATCH] 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: Dan Carpenter Signed-off-by: Andy King Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/misc/vmw_vmci/vmci_guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c index d302c89d2bfa..d7df6cfed28a 100644 --- a/drivers/misc/vmw_vmci/vmci_guest.c +++ b/drivers/misc/vmw_vmci/vmci_guest.c @@ -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, -- 2.39.5