[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181217123123.GA26530@mani>
Date: Mon, 17 Dec 2018 18:01:24 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Wei Yongjun <weiyongjun1@...wei.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] irqchip: irq-rda-intc: Fix return value check in
rda8810_intc_init()
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@...wei.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.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);
>
>
>
Powered by blists - more mailing lists