From: Michal Simek <michal.simek@xilinx.com>
To: Aditya Pakki <pakki001@umn.edu>
Cc: <kjlu@umn.edu>, Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Michal Simek <michal.simek@xilinx.com>,
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: Thu, 3 Jan 2019 12:16:49 +0100 [thread overview]
Message-ID: <bfd90c61-233f-b200-a8f2-f1dc2bb4c003@xilinx.com> (raw)
In-Reply-To: <20181227195454.26344-1-pakki001@umn.edu>
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>
Thanks,
Michal
next prev parent reply other threads:[~2019-01-03 11:20 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 [this message]
2019-01-05 16:45 ` 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=bfd90c61-233f-b200-a8f2-f1dc2bb4c003@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=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=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).