Skip to content

Commit 196754c

Browse files
Dan CarpenterKAGA-KOKO
authored andcommitted
irqchip/aspeed-scu-ic: Fix an IS_ERR() vs NULL check
of_iomap() doesn't return error pointers, it returns NULL. Fix the error checking to check for NULL pointers. Fixes: 86cd430 ("irqchip/aspeed-scu-ic: Refactor driver to support variant-based initialization") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent c746c3b commit 196754c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-aspeed-scu-ic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
215215
int irq, rc = 0;
216216

217217
scu_ic->base = of_iomap(node, 0);
218-
if (IS_ERR(scu_ic->base)) {
219-
rc = PTR_ERR(scu_ic->base);
218+
if (!scu_ic->base) {
219+
rc = -ENOMEM;
220220
goto err;
221221
}
222222

0 commit comments

Comments
 (0)