All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
@ 2021-10-25  5:00 ` Yang Yingliang
  0 siblings, 0 replies; 9+ messages in thread
From: Yang Yingliang @ 2021-10-25  5:00 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: maz, claudiu.beznea

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>
---
 drivers/irqchip/irq-mchp-eic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-25 10:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-25  5:00 [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init() Yang Yingliang
2021-10-25  5:00 ` Yang Yingliang
2021-10-25  7:44 ` Claudiu.Beznea
2021-10-25  7:44   ` Claudiu.Beznea
2021-10-25  9:40   ` Claudiu.Beznea
2021-10-25  9:40     ` Claudiu.Beznea
2021-10-25 10:30     ` Marc Zyngier
2021-10-25 10:30       ` Marc Zyngier
2021-10-25  8:11 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.