From: Dan Carpenter Date: Mon, 4 Apr 2016 11:17:36 +0000 (+0300) Subject: irqchip/mbigen: Checking for IS_ERR() instead of NULL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=086eec2de00ef5c1ac12ddb5a537289fbdc22689;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git irqchip/mbigen: Checking for IS_ERR() instead of NULL of_platform_device_create() returns NULL on error, it never returns error pointers. Fixes: ed2a1002d25c ('irqchip/mbigen: Handle multiple device nodes in a mbigen module') Acked-by: Marc Zyngier Signed-off-by: Dan Carpenter Signed-off-by: Marc Zyngier --- diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c index d67baa231c13..03b79b061d24 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -263,8 +263,8 @@ static int mbigen_device_probe(struct platform_device *pdev) parent = platform_bus_type.dev_root; child = of_platform_device_create(np, NULL, parent); - if (IS_ERR(child)) - return PTR_ERR(child); + if (!child) + return -ENOMEM; if (of_property_read_u32(child->dev.of_node, "num-pins", &num_pins) < 0) {