Linux IIO development
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Nuno Sá" <nuno.sa@analog.com>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio: adc: max1027: fix error code in max1027_wait_eoc()
Date: Mon, 4 Oct 2021 16:17:11 +0200	[thread overview]
Message-ID: <20211004161711.26e6065e@xps13> (raw)
In-Reply-To: <20211004134454.GA11689@kili>

Hello,

dan.carpenter@oracle.com 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@oracle.com>
> ---
>  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@bootlin.com>

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


Thanks,
Miquèl

  reply	other threads:[~2021-10-04 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 13:44 [PATCH] iio: adc: max1027: fix error code in max1027_wait_eoc() Dan Carpenter
2021-10-04 14:17 ` Miquel Raynal [this message]
2021-10-04 19:31   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211004161711.26e6065e@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jic23@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox