All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH -next] remoteproc: qcom: wcnss: Fix return value check in wcnss_probe()
Date: Mon, 22 Aug 2016 21:39:27 -0700	[thread overview]
Message-ID: <20160823043927.GA15161@tuxbot> (raw)
In-Reply-To: <1471790370-3127-1-git-send-email-weiyj.lk@gmail.com>

On Sun 21 Aug 07:39 PDT 2016, Wei Yongjun wrote:

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> In case of error, the function devm_ioremap_resource() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Thanks Wei, applied to rproc-next.

Regards,
Bjorn

> ---
>  drivers/remoteproc/qcom_wcnss.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
> index 14c4585..1917de7 100644
> --- a/drivers/remoteproc/qcom_wcnss.c
> +++ b/drivers/remoteproc/qcom_wcnss.c
> @@ -528,8 +528,8 @@ static int wcnss_probe(struct platform_device *pdev)
>  
>  	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pmu");
>  	mmio = devm_ioremap_resource(&pdev->dev, res);
> -	if (!mmio) {
> -		ret = -ENOMEM;
> +	if (IS_ERR(mmio)) {
> +		ret = PTR_ERR(mmio);
>  		goto free_rproc;
>  	};
> 

      reply	other threads:[~2016-08-23  4:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21 14:39 [PATCH -next] remoteproc: qcom: wcnss: Fix return value check in wcnss_probe() Wei Yongjun
2016-08-23  4:39 ` Bjorn Andersson [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=20160823043927.GA15161@tuxbot \
    --to=bjorn.andersson@linaro.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.