Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Dan Carpenter and committed by
Thomas Gleixner
3424243e 57f01796

+2 -2
+2 -2
drivers/irqchip/irq-mvebu-sei.c
··· 384 384 385 385 sei->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 386 386 sei->base = devm_ioremap_resource(sei->dev, sei->res); 387 - if (!sei->base) { 387 + if (IS_ERR(sei->base)) { 388 388 dev_err(sei->dev, "Failed to remap SEI resource\n"); 389 - return -ENODEV; 389 + return PTR_ERR(sei->base); 390 390 } 391 391 392 392 /* Retrieve the SEI capabilities with the interrupt ranges */