Re: [PATCH -next] hwrng: Fix unsigned comparison with less than zero

2019-02-18 Thread Sumit Garg
On Tue, 19 Feb 2019 at 12:04, YueHaibing wrote: > > The return from the call to tee_client_invoke_func can be a > negative error code however this is being assigned to an > unsigned variable 'ret' hence the check is always false. > Fix this by making 'ret' an int. > > Detected by Coccinelle ("Unsi

[PATCH -next] hwrng: Fix unsigned comparison with less than zero

2019-02-18 Thread YueHaibing
The return from the call to tee_client_invoke_func can be a negative error code however this is being assigned to an unsigned variable 'ret' hence the check is always false. Fix this by making 'ret' an int. Detected by Coccinelle ("Unsigned expression compared with zero: ret < 0") Fixes: 5fe8b1cc