public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: kjlu@umn.edu, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: Fix error handling in vadc_do_conversion
Date: Sat, 6 Mar 2021 17:18:31 +0000	[thread overview]
Message-ID: <20210306171831.0033fec7@archlinux> (raw)
In-Reply-To: <20210301081622.15696-1-dinghao.liu@zju.edu.cn>

On Mon,  1 Mar 2021 16:16:22 +0800
Dinghao Liu <dinghao.liu@zju.edu.cn> wrote:

> There is one vadc_poll_wait_eoc() call in vadc_do_conversion
> that we have caught its return value but lack further handling.
> Check and jump to err_disable label just like the other
> vadc_poll_wait_eoc() in this function.
> 
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Looks good to me, but will leave this a little longer for others to review.
If it looks like I have forgotten it in 2 weeks time, feel free to remind
me!

Jonathan

> ---
>  drivers/iio/adc/qcom-spmi-vadc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c
> index 05ff948372b3..fe36b0ba8273 100644
> --- a/drivers/iio/adc/qcom-spmi-vadc.c
> +++ b/drivers/iio/adc/qcom-spmi-vadc.c
> @@ -324,6 +324,8 @@ static int vadc_do_conversion(struct vadc_priv *vadc,
>  
>  	if (vadc->poll_eoc) {
>  		ret = vadc_poll_wait_eoc(vadc, timeout);
> +		if (ret)
> +			goto err_disable;
>  	} else {
>  		ret = wait_for_completion_timeout(&vadc->complete, timeout);
>  		if (!ret) {


      reply	other threads:[~2021-03-06 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  8:16 [PATCH] iio: adc: Fix error handling in vadc_do_conversion Dinghao Liu
2021-03-06 17:18 ` Jonathan Cameron [this message]

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=20210306171831.0033fec7@archlinux \
    --to=jic23@kernel.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=kjlu@umn.edu \
    --cc=lars@metafoo.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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