mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-01 13:10:14 +07:00
irqchip/mbigen: Checking for IS_ERR() instead of NULL
of_platform_device_create() returns NULL on error, it never returns
error pointers.
Fixes: ed2a1002d2
('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>
This commit is contained in:
parent
074f23b675
commit
086eec2de0
@ -263,8 +263,8 @@ static int mbigen_device_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
parent = platform_bus_type.dev_root;
|
parent = platform_bus_type.dev_root;
|
||||||
child = of_platform_device_create(np, NULL, parent);
|
child = of_platform_device_create(np, NULL, parent);
|
||||||
if (IS_ERR(child))
|
if (!child)
|
||||||
return PTR_ERR(child);
|
return -ENOMEM;
|
||||||
|
|
||||||
if (of_property_read_u32(child->dev.of_node, "num-pins",
|
if (of_property_read_u32(child->dev.of_node, "num-pins",
|
||||||
&num_pins) < 0) {
|
&num_pins) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user