Re: [PATCH v2 4/6] regulator: allow use of dummy regulator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 19. 11. 21 11:49, Trent Piepho wrote:
On Fri, Nov 19, 2021 at 1:55 AM Andrej Picej <andrej.picej@xxxxxxxxx> 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
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux