Merge tag 'regulator-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-2.6-microblaze.git] / drivers / regulator / scmi-regulator.c
index a38343f..bbadf72 100644 (file)
@@ -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;
+               }
        }
 
        /*