On 19. 11. 21 11:49, Trent Piepho wrote:
On Fri, Nov 19, 2021 at 1:55 AM Andrej Picej <[email protected]> wrote:

         ret = of_device_ensure_probed(node);
-       if (ret)
+       if (ret) {
+               /*
+                * If "barebox,allow-dummy-supply" property is set for regulator
+                * provider allow use of dummy regulator (NULL is returned).
+                * Check regulator node and its parent if this setting is set
+                * PMIC wide.
+                */
+               node_parent = of_get_parent(node);
+               if (of_get_property(node, "barebox,allow-dummy-supply", NULL) ||
+                   of_get_property(node_parent, "barebox,allow-dummy-supply", 
NULL)) {
+                       dev_dbg(dev, "Allow use of dummy regulator for " \
+                               "%s-supply\n", supply);
+                       ri = NULL;
+                       goto out;
+               }
+
                 return ERR_PTR(ret);

This return, which was added in "common: add initial barebox
deep-probe support", is a memory leak of propname.  It should be goto
out.


You are right, if that's ok I will create a separate patch for that.

BR, Andrej

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to