[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181218121542.15500-1-yuehaibing@huawei.com>
Date: Tue, 18 Dec 2018 20:15:42 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <tglx@...utronix.de>, <jason@...edaemon.net>,
<marc.zyngier@....com>
CC: <linux-kernel@...r.kernel.org>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] irqchip/irq-rda-intc: Fix return value check in rda8810_intc_init()
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: YueHaibing <yuehaibing@...wei.com>
---
drivers/irqchip/irq-rda-intc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-rda-intc.c b/drivers/irqchip/irq-rda-intc.c
index 1176291..f80c424 100644
--- a/drivers/irqchip/irq-rda-intc.c
+++ b/drivers/irqchip/irq-rda-intc.c
@@ -85,7 +85,7 @@ 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)
+ if (IS_ERR(rda_intc_base))
return -ENXIO;
/* Mask all interrupt sources */
--
2.7.0
Powered by blists - more mailing lists