Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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")
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

authored by

Wei Yongjun and committed by
Marc Zyngier
1fb51c97 893b0aff

+2 -2
+2 -2
drivers/irqchip/irq-rda-intc.c
··· 85 85 struct device_node *parent) 86 86 { 87 87 rda_intc_base = of_io_request_and_map(node, 0, "rda-intc"); 88 - if (!rda_intc_base) 89 - return -ENXIO; 88 + if (IS_ERR(rda_intc_base)) 89 + return PTR_ERR(rda_intc_base); 90 90 91 91 /* Mask all interrupt sources */ 92 92 writel_relaxed(RDA_IRQ_MASK_ALL, rda_intc_base + RDA_INTC_MASK_CLR);