]> git.baikalelectronics.ru Git - kernel.git/commit
VSOCK: remove unnecessary ternary operator on return value
authorColin Ian King <colin.king@canonical.com>
Wed, 29 Mar 2017 15:33:55 +0000 (16:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Mar 2017 18:07:08 +0000 (11:07 -0700)
commite1e2195429d3dfd4c13a1086025bc31ea776b679
treebddb131915e0a0a357e1c0f35eb77f6d2c75c520
parent40f1bfda7bcae3ebe94d0617f50bfd8b6109868e
VSOCK: remove unnecessary ternary operator on return value

Rather than assign the positive errno values to ret and then
checking if it is positive and flip the sign, just return the
errno value.

Detected by CoverityScan, CID#986649 ("Logically Dead Code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/vmci_transport.c