Skip to content

Commit 1fb51c9

Browse files
Wei YongjunMarc Zyngier
authored andcommitted
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: d852e62 ("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>
1 parent 893b0af commit 1fb51c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-rda-intc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static int __init rda8810_intc_init(struct device_node *node,
8585
struct device_node *parent)
8686
{
8787
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);
9090

9191
/* Mask all interrupt sources */
9292
writel_relaxed(RDA_IRQ_MASK_ALL, rda_intc_base + RDA_INTC_MASK_CLR);

0 commit comments

Comments
 (0)