aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-04-04 07:17:36 -0400
committerMarc Zyngier <marc.zyngier@arm.com>2016-05-11 05:12:13 -0400
commit086eec2de00ef5c1ac12ddb5a537289fbdc22689 (patch)
treeaedaf5ed37e923db6e6321849e100373cce58cff
parent074f23b675f9f2a9c51c16ecefd06b4658d5e629 (diff)
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 <marc.zyngier@arm.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r--drivers/irqchip/irq-mbigen.c4
1 files changed, 2 insertions, 2 deletions
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)
263 263
264 parent = platform_bus_type.dev_root; 264 parent = platform_bus_type.dev_root;
265 child = of_platform_device_create(np, NULL, parent); 265 child = of_platform_device_create(np, NULL, parent);
266 if (IS_ERR(child)) 266 if (!child)
267 return PTR_ERR(child); 267 return -ENOMEM;
268 268
269 if (of_property_read_u32(child->dev.of_node, "num-pins", 269 if (of_property_read_u32(child->dev.of_node, "num-pins",
270 &num_pins) < 0) { 270 &num_pins) < 0) {