linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] irqchip: irq-rda-intc: Fix return value check in rda8810_intc_init()
Date: Mon, 17 Dec 2018 18:01:24 +0530	[thread overview]
Message-ID: <20181217123123.GA26530@mani> (raw)
In-Reply-To: <1545047898-153890-1-git-send-email-weiyongjun1@huawei.com>

On Mon, Dec 17, 2018 at 11:58:18AM +0000, Wei Yongjun wrote:
> In case of error, the function of_io_request_and_map() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 
> Fixes: d852e62ad689 ("irqchip: Add RDA8810PL interrupt driver")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  drivers/irqchip/irq-rda-intc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-rda-intc.c b/drivers/irqchip/irq-rda-intc.c
> index 1176291..9601683 100644
> --- a/drivers/irqchip/irq-rda-intc.c
> +++ b/drivers/irqchip/irq-rda-intc.c
> @@ -85,8 +85,8 @@ static int __init rda8810_intc_init(struct device_node *node,
>  				    struct device_node *parent)
>  {
>  	rda_intc_base = of_io_request_and_map(node, 0, "rda-intc");
> -	if (!rda_intc_base)
> -		return -ENXIO;
> +	if (IS_ERR(rda_intc_base))
> +		return PTR_ERR(rda_intc_base);
>  
>  	/* Mask all interrupt sources */
>  	writel_relaxed(RDA_IRQ_MASK_ALL, rda_intc_base + RDA_INTC_MASK_CLR);
> 
> 
> 

      reply	other threads:[~2018-12-17 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 11:58 [PATCH -next] irqchip: irq-rda-intc: Fix return value check in rda8810_intc_init() Wei Yongjun
2018-12-17 12:31 ` Manivannan Sadhasivam [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=20181217123123.GA26530@mani \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=jason@lakedaemon.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    --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).