diff options
author | Andy King <acking@vmware.com> | 2013-01-10 18:41:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 15:07:39 -0500 |
commit | 0e7894dc82bd9d4d82c16d16189f58da6d41d018 (patch) | |
tree | 9b51c182bfbd2fef57f6d64b59a137f99cc70221 /drivers/misc | |
parent | 32b083a3fd1452b9d5aba8e781ca95b566f3e054 (diff) |
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 <dan.carpenter@oracle.com>
Signed-off-by: Andy King <acking@vmware.com>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/vmw_vmci/vmci_guest.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
78 | u32 vmci_get_vm_context_id(void) | 78 | u32 vmci_get_vm_context_id(void) |
79 | { | 79 | { |
80 | if (vm_context_id == VMCI_INVALID_ID) { | 80 | if (vm_context_id == VMCI_INVALID_ID) { |
81 | u32 result; | 81 | int result; |
82 | struct vmci_datagram get_cid_msg; | 82 | struct vmci_datagram get_cid_msg; |
83 | get_cid_msg.dst = | 83 | get_cid_msg.dst = |
84 | vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID, | 84 | vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID, |