Re: [PATCHv2 3/6] hwmon: (socfpga) Add hardware monitoring support on SoCFPGA platforms

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

 



On Thu, May 25, 2023 at 04:20:12PM -0500, Dinh Nguyen wrote:
> On 5/9/2023 1:57 AM, Krzysztof Kozlowski wrote:
> > On 08/05/2023 23:28, dinh.nguyen@xxxxxxxxxxxxxxx wrote:

> > > +	for_each_child_of_node(child, grandchild) {
> > > +		ret = of_property_read_u32(grandchild, "reg", &val);
> > > +		if (ret)
> > > +			return dev_err_probe(dev, ret, "missing reg property of %pOF\n",
> > > +					     grandchild);
> > Where do you drop child reference?
> 
> Not sure what you mean here? Can you clarify?

for_each_child_of_node() bumps a reference of the current (iterator) node, when
the loop is interrupted it's a user (of for_each macro) responsibility to drop
it.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux