irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe()
Subsystems (3)
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")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/irqchip/irq-mvebu-gicp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-mvebu-gicp.c +1 -1
@@ -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
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")
Signed-off-by Dan Carpenter <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- drivers/irqchip/irq-mvebu-gicp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-mvebu-gicp.c +1 -1
@@ -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++)