In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test.
Fixes: 706cffc1b912 ("irqchip/exiu: Add support for Socionext Synquacer EXIU controller") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/irqchip/irq-sni-exiu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c index 1b6e2f7..1927b2f 100644 --- a/drivers/irqchip/irq-sni-exiu.c +++ b/drivers/irqchip/irq-sni-exiu.c @@ -196,8 +196,8 @@ static int __init exiu_init(struct device_node *node, } data->base = of_iomap(node, 0); - if (IS_ERR(data->base)) { - err = PTR_ERR(data->base); + if (!data->base) { + err = -ENODEV; goto out_free; }