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: 86cd4301c2 ("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>
This commit is contained in:
Dan Carpenter 2025-09-27 15:26:05 +03:00 committed by Thomas Gleixner
parent c746c3b516
commit 196754c2a0
1 changed files with 2 additions and 2 deletions

View File

@ -215,8 +215,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
int irq, rc = 0;
scu_ic->base = of_iomap(node, 0);
if (IS_ERR(scu_ic->base)) {
rc = PTR_ERR(scu_ic->base);
if (!scu_ic->base) {
rc = -ENOMEM;
goto err;
}