All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe()
@ 2025-08-19  9:40 Dan Carpenter
  2025-08-24 10:11 ` [tip: irq/urgent] " tip-bot2 for Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-08-19  9:40 UTC (permalink / raw)
  To: Elad Nachman
  Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Thomas Gleixner, linux-arm-kernel, linux-kernel, kernel-janitors

The ioremap() function never returns error pointers, it returns NULL
on error.  Fix the checking to match.

Fixes: 3c3d7dbab2c7 ("irqchip/mvebu-gicp: Clear pending interrupts on init")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/irqchip/irq-mvebu-gicp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c
index 54833717f8a7..667bde3c651f 100644
--- a/drivers/irqchip/irq-mvebu-gicp.c
+++ b/drivers/irqchip/irq-mvebu-gicp.c
@@ -238,7 +238,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
 	}
 
 	base = ioremap(gicp->res->start, resource_size(gicp->res));
-	if (IS_ERR(base)) {
+	if (!base) {
 		dev_err(&pdev->dev, "ioremap() failed. Unable to clear pending interrupts.\n");
 	} else {
 		for (i = 0; i < 64; i++)
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip: irq/urgent] irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe()
  2025-08-19  9:40 [PATCH] irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe() Dan Carpenter
@ 2025-08-24 10:11 ` tip-bot2 for Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Dan Carpenter @ 2025-08-24 10:11 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:     c8bb0f00a4886b24d933ffaabcdc09bf9a370dca
Gitweb:        https://git.kernel.org/tip/c8bb0f00a4886b24d933ffaabcdc09bf9a370dca
Author:        Dan Carpenter <dan.carpenter@linaro.org>
AuthorDate:    Tue, 19 Aug 2025 12:40:02 +03:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 24 Aug 2025 12:00:47 +02:00

irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe()

ioremap() never returns error pointers, it returns NULL on error.  Fix the
check to match.

Fixes: 3c3d7dbab2c7 ("irqchip/mvebu-gicp: Clear pending interrupts on init")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/aKRGcgMeaXm2TMIC@stanley.mountain

---
 drivers/irqchip/irq-mvebu-gicp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c
index 5483371..667bde3 100644
--- a/drivers/irqchip/irq-mvebu-gicp.c
+++ b/drivers/irqchip/irq-mvebu-gicp.c
@@ -238,7 +238,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
 	}
 
 	base = ioremap(gicp->res->start, resource_size(gicp->res));
-	if (IS_ERR(base)) {
+	if (!base) {
 		dev_err(&pdev->dev, "ioremap() failed. Unable to clear pending interrupts.\n");
 	} else {
 		for (i = 0; i < 64; i++)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-24 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19  9:40 [PATCH] irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe() Dan Carpenter
2025-08-24 10:11 ` [tip: irq/urgent] " tip-bot2 for Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.