Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

2016-10-25 Thread Colin Ian King
On 25/10/16 20:11, Lars-Peter Clausen wrote: > On 10/25/2016 09:04 PM, Colin King wrote: >> From: Colin Ian King >> >> In the case that the read size is not 2 or 4 bytes >> then maxim_thermocouple_read is not initializing ret and >> hence may return early with a bogus

Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

2016-10-25 Thread Colin Ian King
On 25/10/16 20:11, Lars-Peter Clausen wrote: > On 10/25/2016 09:04 PM, Colin King wrote: >> From: Colin Ian King >> >> In the case that the read size is not 2 or 4 bytes >> then maxim_thermocouple_read is not initializing ret and >> hence may return early with a bogus error return or >> just

Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

2016-10-25 Thread Lars-Peter Clausen
On 10/25/2016 09:04 PM, Colin King wrote: > From: Colin Ian King > > In the case that the read size is not 2 or 4 bytes > then maxim_thermocouple_read is not initializing ret and > hence may return early with a bogus error return or > just through to return with a bogos

Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

2016-10-25 Thread Lars-Peter Clausen
On 10/25/2016 09:04 PM, Colin King wrote: > From: Colin Ian King > > In the case that the read size is not 2 or 4 bytes > then maxim_thermocouple_read is not initializing ret and > hence may return early with a bogus error return or > just through to return with a bogos unread value in *val. >

[PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

2016-10-25 Thread Colin King
From: Colin Ian King In the case that the read size is not 2 or 4 bytes then maxim_thermocouple_read is not initializing ret and hence may return early with a bogus error return or just through to return with a bogos unread value in *val. Fix this by setting ret to

[PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

2016-10-25 Thread Colin King
From: Colin Ian King In the case that the read size is not 2 or 4 bytes then maxim_thermocouple_read is not initializing ret and hence may return early with a bogus error return or just through to return with a bogos unread value in *val. Fix this by setting ret to -EINVAL for invalid