Skip to content

Commit 68a6e0c

Browse files
Yang YingliangMarc Zyngier
authored andcommitted
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 <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 00fa346 commit 68a6e0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/irqchip/irq-mchp-eic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
209209
return -ENOMEM;
210210

211211
eic->base = of_iomap(node, 0);
212-
if (IS_ERR(eic->base)) {
212+
if (!eic->base) {
213213
ret = -ENOMEM;
214214
goto free;
215215
}

0 commit comments

Comments
 (0)