Commit 1fb51c97 authored by Wei Yongjun's avatar Wei Yongjun Committed by Marc Zyngier

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: d852e62a ("irqchip: Add RDA8810PL interrupt driver")
Acked-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 893b0aff
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment