Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 86cd4301c285 ("irqchip/aspeed-scu-ic: Refactor driver to support variant-based initialization")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Dan Carpenter and committed by
Thomas Gleixner
196754c2 c746c3b5

+2 -2
+2 -2
drivers/irqchip/irq-aspeed-scu-ic.c
··· 215 215 int irq, rc = 0; 216 216 217 217 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; 220 220 goto err; 221 221 } 222 222