Skip to content

Commit

Permalink
irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
Browse files Browse the repository at this point in the history
The devm_ioremap_resource() function never returns NULL, it returns
error pointers.

Fixes: 61ce8d8 ("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
  • Loading branch information
Dan Carpenter authored and Thomas Gleixner committed Nov 1, 2018
1 parent 57f0179 commit 3424243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-mvebu-sei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 3424243

Please sign in to comment.