diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-10-13 13:22:46 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-11-01 14:38:48 +0300 |
commit | 3424243e39e8ec138486926949e3668e7553125d (patch) | |
tree | 0c435c45e46dc74abf59017e1e9e08fe8075835d /drivers | |
parent | 57f01796f14fecf00d330fe39c8d2477ced9cd79 (diff) | |
download | linux-3424243e39e8ec138486926949e3668e7553125d.tar.xz |
irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel-janitors@vger.kernel.org
Link: https://lkml.kernel.org/r/20181013102246.GD16086@mwanda
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/irqchip/irq-mvebu-sei.c | 4 |
1 files 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 */ |