public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>
Cc: "Popa, Stefan Serban" <StefanSerban.Popa@analog.com>,
	"m.felsch@pengutronix.de" <m.felsch@pengutronix.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/3] iio: adc: ad799x: fix probe error handling
Date: Sat, 5 Oct 2019 13:38:46 +0100	[thread overview]
Message-ID: <20191005133846.6de638d6@archlinux> (raw)
In-Reply-To: <8405aec02752668bee7563e8c86c225c55f6705b.camel@analog.com>

On Wed, 18 Sep 2019 06:29:19 +0000
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:

> On Tue, 2019-09-17 at 18:09 +0200, Marco Felsch wrote:
> > [External]
> > 
> > Since commit 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe
> > and reset alert status on probe") the error path is wrong since it
> > leaves the vref regulator on. Fix this by disabling both regulators.
> >   
> 
> Good catch.
> Many thanks :)
> 
> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Obviously this may delay the other two patches which will get queued
up for the next merge window, but as we have plenty of time that shouldn't
be an issue.

Thanks,

Jonathan

> 
> > Fixes: 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and
> > reset alert status on probe")
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> >  drivers/iio/adc/ad799x.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c
> > index 5a3ca5904ded..f658012baad8 100644
> > --- a/drivers/iio/adc/ad799x.c
> > +++ b/drivers/iio/adc/ad799x.c
> > @@ -810,10 +810,10 @@ static int ad799x_probe(struct i2c_client *client,
> >  
> >  	ret = ad799x_write_config(st, st->chip_config->default_config);
> >  	if (ret < 0)
> > -		goto error_disable_reg;
> > +		goto error_disable_vref;
> >  	ret = ad799x_read_config(st);
> >  	if (ret < 0)
> > -		goto error_disable_reg;
> > +		goto error_disable_vref;
> >  	st->config = ret;
> >  
> >  	ret = iio_triggered_buffer_setup(indio_dev, NULL,  


  reply	other threads:[~2019-10-05 12:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 16:09 [PATCH 0/3] ADC AD799x improvements Marco Felsch
2019-09-17 16:09 ` [PATCH 1/3] iio: adc: ad799x: fix probe error handling Marco Felsch
2019-09-18  6:29   ` Ardelean, Alexandru
2019-10-05 12:38     ` Jonathan Cameron [this message]
2019-09-17 16:09 ` [PATCH 2/3] iio: adc: ad799x: factor out config register update Marco Felsch
2019-09-18  6:51   ` Ardelean, Alexandru
2019-09-18  8:52     ` Marco Felsch
2019-09-18 10:17       ` Ardelean, Alexandru
2019-09-17 16:09 ` [PATCH 3/3] iio: adc: ad799x: add pm_ops to disable the device completely Marco Felsch
2019-09-18  6:59   ` Ardelean, Alexandru
2019-09-18  8:37     ` Marco Felsch
2019-09-18  7:00 ` [PATCH 0/3] ADC AD799x improvements Ardelean, Alexandru
2019-09-18  8:22   ` Marco Felsch

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=20191005133846.6de638d6@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=StefanSerban.Popa@analog.com \
    --cc=alexandru.Ardelean@analog.com \
    --cc=kernel@pengutronix.de \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --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