summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-10-25 08:00:55 +0300
committerMarc Zyngier <maz@kernel.org>2021-10-25 11:02:18 +0300
commit68a6e0c63c76128d403e8ca016c0bcb732ff1b05 (patch)
treeffa616237ded10e19da33c9f3349e89907c2bc89 /drivers/irqchip
parent00fa3461c86dd289b441d4d5a6bb236064bd207b (diff)
downloadlinux-68a6e0c63c76128d403e8ca016c0bcb732ff1b05.tar.xz
irqchip/mchp-eic: Fix return value check in mchp_eic_init()
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. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20211025050055.1129845-1-yangyingliang@huawei.com
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-mchp-eic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c
index 09b7a8cdb611..c726a19837d2 100644
--- a/drivers/irqchip/irq-mchp-eic.c
+++ b/drivers/irqchip/irq-mchp-eic.c
@@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
return -ENOMEM;
eic->base = of_iomap(node, 0);
- if (IS_ERR(eic->base)) {
+ if (!eic->base) {
ret = -ENOMEM;
goto free;
}