Re: [PATCH v2 3/7] iio:light:cm3323: pass up error value

Jonathan Cameron
2015-06-21T13:27:14Z

On 17/06/15 23:32, Hartmut Knaack wrote:
> cm3323_get_it_bits() returns a valid error code, so pass it up in
> cm3323_read_raw().
>
> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
> drivers/iio/light/cm3323.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/cm3323.c b/drivers/iio/light/cm3323.c
> index a1d4905..feb4dbc 100644
> --- a/drivers/iio/light/cm3323.c
> +++ b/drivers/iio/light/cm3323.c
> @@ -175,7 +175,7 @@ static int cm3323_read_raw(struct iio_dev *indio_dev,
> i = cm3323_get_it_bits(data);
> if (i < 0) {
> mutex_unlock(&data->mutex);
> - return -EINVAL;
> + return i;
> }
>
> *val = cm3323_int_time[i].val;