* [PATCH next] irqchip/aspeed-scu-ic: Fix an IS_ERR() vs NULL check
@ 2025-09-27 12:26 Dan Carpenter
2025-10-07 8:27 ` [tip: irq/urgent] " tip-bot2 for Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-09-27 12:26 UTC (permalink / raw)
To: Ryan Chen
Cc: Eddie James, Thomas Gleixner, Joel Stanley, Andrew Jeffery,
linux-aspeed, linux-kernel, linux-arm-kernel, kernel-janitors
The of_iomap() function 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>
---
drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 5584e0f82cce..bee59c8c4c93 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -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;
}
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip: irq/urgent] irqchip/aspeed-scu-ic: Fix an IS_ERR() vs NULL check
2025-09-27 12:26 [PATCH next] irqchip/aspeed-scu-ic: Fix an IS_ERR() vs NULL check Dan Carpenter
@ 2025-10-07 8:27 ` tip-bot2 for Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Dan Carpenter @ 2025-10-07 8:27 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Dan Carpenter, Thomas Gleixner, x86, linux-kernel, maz
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 196754c2a04a8ba682b00ea7c818897295c98967
Gitweb: https://git.kernel.org/tip/196754c2a04a8ba682b00ea7c818897295c98967
Author: Dan Carpenter <dan.carpenter@linaro.org>
AuthorDate: Sat, 27 Sep 2025 15:26:05 +03:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 07 Oct 2025 10:23:22 +02:00
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>
---
drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 5584e0f..bee59c8 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-07 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-27 12:26 [PATCH next] irqchip/aspeed-scu-ic: Fix an IS_ERR() vs NULL check Dan Carpenter
2025-10-07 8:27 ` [tip: irq/urgent] " tip-bot2 for Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®