Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: lars@metafoo.de, tangbin@cmss.chinamobile.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: Add check for devm_request_threaded_irq
Date: Sat, 26 Feb 2022 18:44:48 +0000	[thread overview]
Message-ID: <20220226184448.0a2a49b1@jic23-huawei> (raw)
In-Reply-To: <20220224062849.3280966-1-jiasheng@iscas.ac.cn>

On Thu, 24 Feb 2022 14:28:49 +0800
Jiasheng Jiang <jiasheng@iscas.ac.cn> wrote:

> As the potential failure of the devm_request_threaded_irq(),
> it should be better to check the return value and return
> error if fails.
> 
> Fixes: fa659a40b80b ("iio: adc: twl6030-gpadc: Use devm_* API family")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Good find.

That one has been there a long time so I'm not going to rush this in
before the next merge window.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to see if we missed anything,

Thanks,

Jonathan

> ---
>  drivers/iio/adc/twl6030-gpadc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
> index afdb59e0b526..d0223e39d59a 100644
> --- a/drivers/iio/adc/twl6030-gpadc.c
> +++ b/drivers/iio/adc/twl6030-gpadc.c
> @@ -911,6 +911,8 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
>  	ret = devm_request_threaded_irq(dev, irq, NULL,
>  				twl6030_gpadc_irq_handler,
>  				IRQF_ONESHOT, "twl6030_gpadc", indio_dev);
> +	if (ret)
> +		return ret;
>  
>  	ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK);
>  	if (ret < 0) {


      reply	other threads:[~2022-02-26 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  6:28 [PATCH] iio: adc: Add check for devm_request_threaded_irq Jiasheng Jiang
2022-02-26 18:44 ` 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=20220226184448.0a2a49b1@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=jiasheng@iscas.ac.cn \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangbin@cmss.chinamobile.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