linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Michal Simek <michal.simek@xilinx.com>
Cc: Aditya Pakki <pakki001@umn.edu>, <kjlu@umn.edu>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Manish Narani <manish.narani@xilinx.com>,
	<linux-iio@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: xilinx: check return value of xadc_write_adc_reg
Date: Sat, 5 Jan 2019 16:45:21 +0000	[thread overview]
Message-ID: <20190105164521.458a08e8@archlinux> (raw)
In-Reply-To: <bfd90c61-233f-b200-a8f2-f1dc2bb4c003@xilinx.com>

On Thu, 3 Jan 2019 12:16:49 +0100
Michal Simek <michal.simek@xilinx.com> wrote:

> On 27. 12. 18 20:54, Aditya Pakki wrote:
> > In function xadc_probe, xadc_write_adc_reg can return an error value
> > when write fails. The fix checks for the return value consistent with
> > other invocations of the latter function.
> > 
> > Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> > ---
> >  drivers/iio/adc/xilinx-xadc-core.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
> > index 3f6be5ac049a..b13c61539d46 100644
> > --- a/drivers/iio/adc/xilinx-xadc-core.c
> > +++ b/drivers/iio/adc/xilinx-xadc-core.c
> > @@ -1273,8 +1273,10 @@ static int xadc_probe(struct platform_device *pdev)
> >  			xadc->threshold[i] = 0xffff;
> >  		else
> >  			xadc->threshold[i] = 0;
> > -		xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
> > +		ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
> >  			xadc->threshold[i]);
> > +		if (ret)
> > +			goto err_free_irq;
> >  	}
> >  
> >  	/* Go to non-buffered mode */
> >   
> 
> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
> 
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> Thanks,
> Michal


      reply	other threads:[~2019-01-05 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 19:54 [PATCH] iio: adc: xilinx: check return value of xadc_write_adc_reg Aditya Pakki
2019-01-03 11:16 ` Michal Simek
2019-01-05 16:45   ` 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=20190105164521.458a08e8@archlinux \
    --to=jic23@kernel.org \
    --cc=kjlu@umn.edu \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=michal.simek@xilinx.com \
    --cc=pakki001@umn.edu \
    --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).