Skip to contentSkip to conversation

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

PATCH Applied Dan Carpenter 2 participants 2 messages Aug 19, 2025 – Aug 24, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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")
---
 drivers/irqchip/irq-mvebu-gicp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-mvebu-gicp.c +1 -1
index 54833717f8a7..667bde3c651f 100644
@@ -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++)
Signature · 1 line
2.47.2
merge bot Applied
#1 lore raw
The following commit has been merged into the irq/urgent branch of tip:

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 <[email protected]>
AuthorDate:    Tue, 19 Aug 2025 12:40:02 +03:00
Committer:     Thomas Gleixner <[email protected]>
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")
---
 drivers/irqchip/irq-mvebu-gicp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-mvebu-gicp.c +1 -1
index 5483371..667bde3 100644
@@ -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++)