Commit 0e7894dc authored by Andy King's avatar Andy King Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <>
Signed-off-by: default avatarAndy King <>
Signed-off-by: default avatarDmitry Torokhov <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 32b083a3
...@@ -78,7 +78,7 @@ bool vmci_guest_code_active(void) ...@@ -78,7 +78,7 @@ bool vmci_guest_code_active(void)
u32 vmci_get_vm_context_id(void) u32 vmci_get_vm_context_id(void)
{ {
if (vm_context_id == VMCI_INVALID_ID) { if (vm_context_id == VMCI_INVALID_ID) {
u32 result; int result;
struct vmci_datagram get_cid_msg; struct vmci_datagram get_cid_msg;
get_cid_msg.dst = get_cid_msg.dst =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment