All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe
@ 2018-10-13 10:22 ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2018-10-13 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

The devm_ioremap_resource() function never returns NULL, it returns
error pointers.

Fixes: 61ce8d8d8a81 ("irqchip/irq-mvebu-sei: Add new driver for Marvell SEI")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/irqchip/irq-mvebu-sei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-sei.c
index 566d69a2edbc..add4c9c934c8 100644
--- a/drivers/irqchip/irq-mvebu-sei.c
+++ b/drivers/irqchip/irq-mvebu-sei.c
@@ -384,9 +384,9 @@ static int mvebu_sei_probe(struct platform_device *pdev)
 
 	sei->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	sei->base = devm_ioremap_resource(sei->dev, sei->res);
-	if (!sei->base) {
+	if (IS_ERR(sei->base)) {
 		dev_err(sei->dev, "Failed to remap SEI resource\n");
-		return -ENODEV;
+		return PTR_ERR(sei->base);
 	}
 
 	/* Retrieve the SEI capabilities with the interrupt ranges */
-- 
2.18.0

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

end of thread, other threads:[~2018-11-01 11:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13 10:22 [PATCH] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe Dan Carpenter
2018-10-13 10:22 ` Dan Carpenter
2018-10-13 10:22 ` Dan Carpenter
2018-10-14 16:03 ` Miquel Raynal
2018-10-14 16:03   ` Miquel Raynal
2018-10-14 16:03   ` Miquel Raynal
2018-11-01 11:42 ` [tip:irq/urgent] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function tip-bot 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.