Re: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-30 Thread David Miller
From: Colin King Date: Wed, 29 Mar 2017 16:33:55 +0100 > From: Colin Ian King > > 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") > > Si

Re: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-30 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 04:33:55PM +0100, Colin King wrote: > From: Colin Ian King > > 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") > >

Re: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-30 Thread Jorgen S. Hansen
> On Mar 29, 2017, at 5:33 PM, Colin King wrote: > > From: Colin Ian King > > 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") > > Signe

Re: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-29 Thread Stefan Hajnoczi
On Wed, Mar 29, 2017 at 04:33:55PM +0100, Colin King wrote: > From: Colin Ian King > > 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") > >

[PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-29 Thread Colin King
From: Colin Ian King 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 --- net/vmw_vsock/vmci_transport.c | 22 +