Re: [PATCH] iio: cros_ec_sensors_core: fix unsigned compared less than zero on status

2016-11-12 Thread Jonathan Cameron
On 10/11/16 03:16, Guenter Roeck wrote: > On Wed, Nov 9, 2016 at 3:12 PM, Colin King wrote: >> From: Colin Ian King >> >> status is a u8 hence the check if status is less than zero has no effect. >> Fix this by replacing status with int ret so the less than zero compare >> will correctly detect e

Re: [PATCH] iio: cros_ec_sensors_core: fix unsigned compared less than zero on status

2016-11-09 Thread Guenter Roeck
On Wed, Nov 9, 2016 at 3:12 PM, Colin King wrote: > From: Colin Ian King > > status is a u8 hence the check if status is less than zero has no effect. > Fix this by replacing status with int ret so the less than zero compare > will correctly detect errors. > > Issue found with static analysis wit

[PATCH] iio: cros_ec_sensors_core: fix unsigned compared less than zero on status

2016-11-09 Thread Colin King
From: Colin Ian King status is a u8 hence the check if status is less than zero has no effect. Fix this by replacing status with int ret so the less than zero compare will correctly detect errors. Issue found with static analysis with CoverityScan, CID 1375919 Signed-off-by: Colin Ian King ---