diff options
Diffstat (limited to 'drivers/regulator/scmi-regulator.c')
-rw-r--r-- | drivers/regulator/scmi-regulator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/scmi-regulator.c b/drivers/regulator/scmi-regulator.c index a38343f8c843..bbadf72b94e8 100644 --- a/drivers/regulator/scmi-regulator.c +++ b/drivers/regulator/scmi-regulator.c @@ -347,8 +347,10 @@ static int scmi_regulator_probe(struct scmi_device *sdev) for_each_child_of_node(np, child) { ret = process_scmi_regulator_of_node(sdev, ph, child, rinfo); /* abort on any mem issue */ - if (ret == -ENOMEM) + if (ret == -ENOMEM) { + of_node_put(child); return ret; + } } /* |