linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jun.nie@linaro.org (Jun Nie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: zx: Fix return value check in zx296702_pd_probe()
Date: Tue, 9 Feb 2016 13:02:12 +0800	[thread overview]
Message-ID: <56B972D4.8040608@linaro.org> (raw)
In-Reply-To: <1454768696-340-1-git-send-email-weiyj_lk@163.com>

On 2016?02?06? 22:24, weiyj_lk at 163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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 <yongjun_wei@trendmicro.com.cn>
> ---
>   arch/arm/mach-zx/zx296702-pm-domain.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-zx/zx296702-pm-domain.c b/arch/arm/mach-zx/zx296702-pm-domain.c
> index e08574d..2037bcb 100644
> --- a/arch/arm/mach-zx/zx296702-pm-domain.c
> +++ b/arch/arm/mach-zx/zx296702-pm-domain.c
> @@ -169,9 +169,9 @@ static int zx296702_pd_probe(struct platform_device *pdev)
>   	}
>
>   	pcubase = devm_ioremap_resource(&pdev->dev, res);
> -	if (!pcubase) {
> +	if (IS_ERR(pcubase)) {
>   		dev_err(&pdev->dev, "ioremap fail.\n");
> -		return -EIO;
> +		return PTR_ERR(pcubase);
>   	}
>
>   	for (i = 0; i < ARRAY_SIZE(zx296702_pm_domains); ++i)
>

Thanks for fixing this issue.
Reviewed-by: Jun Nie <jun.nie@linaro.org>

      reply	other threads:[~2016-02-09  5:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 14:24 [PATCH] ARM: zx: Fix return value check in zx296702_pd_probe() weiyj_lk at 163.com
2016-02-09  5:02 ` Jun Nie [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=56B972D4.8040608@linaro.org \
    --to=jun.nie@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).