Re: [PATCH] iio: adc: max1027: fix error code in max1027_wait_eoc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

dan.carpenter@xxxxxxxxxx wrote on Mon, 4 Oct 2021 16:44:54 +0300:

> Return -ETIMEDOUT on timeout instead of success.
> 
> Fixes: 54f14be01e17 ("iio: adc: max1027: Use the EOC IRQ when populated for single reads")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  drivers/iio/adc/max1027.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
> index 45dc8a625fa3..4daf1d576c4e 100644
> --- a/drivers/iio/adc/max1027.c
> +++ b/drivers/iio/adc/max1027.c
> @@ -286,7 +286,7 @@ static int max1027_wait_eoc(struct iio_dev *indio_dev)
>  						  msecs_to_jiffies(1000));
>  		reinit_completion(&st->complete);
>  		if (!ret)
> -			return ret;
> +			return -ETIMEDOUT;

Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

>  	} else {
>  		if (indio_dev->active_scan_mask)
>  			conversion_time *= hweight32(*indio_dev->active_scan_mask);


Thanks,
Miquèl



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux