kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Renato Lui Geh <renatogeh@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Michael.Hennerich@analog.com, renatogeh@gmail.com,
	lars@metafoo.de, jic23@kernel.org, knaack.h@gmx.de,
	pmeerw@pmeerw.net, giuliano.belinassi@usp.br,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7780: Fix a resource handling path in 'ad7780_probe()'
Date: Mon, 18 May 2020 02:21:29 +0000	[thread overview]
Message-ID: <20200518022129.xkcuw4yxotnll7ym@renatolg> (raw)
In-Reply-To: <20200517095953.278950-1-christophe.jaillet@wanadoo.fr>

Acked-by: Renato Lui Geh <renatogeh@gmail.com>

On 05/17, Christophe JAILLET wrote:
>If 'ad7780_init_gpios()' fails, we must not release some resources that
>have not been allocated yet. Return directly instead.
>
>Fixes: 5bb30e7daf00 ("staging: iio: ad7780: move regulator to after GPIO init")
>Fixes: 9085daa4abcc ("staging: iio: ad7780: add gain & filter gpio support")
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>---
> drivers/iio/adc/ad7780.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/iio/adc/ad7780.c b/drivers/iio/adc/ad7780.c
>index f47606ebbbbe..b33fe6c3907e 100644
>--- a/drivers/iio/adc/ad7780.c
>+++ b/drivers/iio/adc/ad7780.c
>@@ -329,7 +329,7 @@ static int ad7780_probe(struct spi_device *spi)
>
> 	ret = ad7780_init_gpios(&spi->dev, st);
> 	if (ret)
>-		goto error_cleanup_buffer_and_trigger;
>+		return ret;
>
> 	st->reg = devm_regulator_get(&spi->dev, "avdd");
> 	if (IS_ERR(st->reg))
>-- 
>2.25.1
>

  reply	other threads:[~2020-05-18  2:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17  9:59 [PATCH] iio: adc: ad7780: Fix a resource handling path in 'ad7780_probe()' Christophe JAILLET
2020-05-18  2:21 ` Renato Lui Geh [this message]
2020-07-05 11:59   ` 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=20200518022129.xkcuw4yxotnll7ym@renatolg \
    --to=renatogeh@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=giuliano.belinassi@usp.br \
    --cc=jic23@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --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;
as well as URLs for NNTP newsgroup(s).