linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Wei Yongjun <weiyj.lk@gmail.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
	Lee Jones <lee.jones@linaro.org>, Marek Vasut <marex@denx.de>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-iio@vger.kernel.org
Subject: Re: [PATCH -next] iio: adc: mxs-lradc: Fix return value check in mxs_lradc_adc_probe()
Date: Wed, 26 Apr 2017 06:23:32 +0100	[thread overview]
Message-ID: <bff84930-f0d3-fb7f-cdd4-fd1a970ce6b6@kernel.org> (raw)
In-Reply-To: <20170425033612.27251-1-weiyj.lk@gmail.com>

On 25/04/17 04:36, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> In case of error, the function devm_ioremap() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should
> be replaced with NULL test.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>

Lee, do you want to pick this up?  If not I'll scoop it up after the merge
window has unwound as a fix.  Needs to be on top of the series:
[PATCH v15 0/5] mxs-lradc: Split driver into MFD

Thanks,

Jonathan
> ---
>  drivers/iio/adc/mxs-lradc-adc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c
> index b0c7d8e..493e2a2 100644
> --- a/drivers/iio/adc/mxs-lradc-adc.c
> +++ b/drivers/iio/adc/mxs-lradc-adc.c
> @@ -719,8 +719,8 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev)
>  
>  	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	adc->base = devm_ioremap(dev, iores->start, resource_size(iores));
> -	if (IS_ERR(adc->base))
> -		return PTR_ERR(adc->base);
> +	if (!adc->base)
> +		return -ENOMEM;
>  
>  	init_completion(&adc->completion);
>  	spin_lock_init(&adc->lock);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2017-04-26  5:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  3:36 [PATCH -next] iio: adc: mxs-lradc: Fix return value check in mxs_lradc_adc_probe() Wei Yongjun
2017-04-26  5:23 ` Jonathan Cameron [this message]
2017-04-26  8:49   ` Lee Jones
2017-04-26  8:58     ` weiyongjun (A)
2017-04-26 10:07       ` Lee Jones
2017-04-26 10:28         ` weiyongjun (A)
2017-04-26 15:02     ` Jonathan Cameron
2017-04-27 15:14 ` [PATCH -next v2] " Wei Yongjun
2017-04-30 16:31   ` Jonathan Cameron
2017-05-01 22:22     ` Ksenija Stanojević
2017-05-02  1:43       ` weiyongjun (A)
2017-05-16 15:26   ` [PATCH -next v3] " Wei Yongjun
2017-05-21 12:12     ` Jonathan Cameron
2017-06-03  9:53       ` 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=bff84930-f0d3-fb7f-cdd4-fd1a970ce6b6@kernel.org \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=pmeerw@pmeerw.net \
    --cc=weiyj.lk@gmail.com \
    --cc=weiyongjun1@huawei.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;
as well as URLs for NNTP newsgroup(s).