lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZF4e8YdAqHwmONzS@smile.fi.intel.com>
Date:   Fri, 12 May 2023 14:11:45 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     dinh.nguyen@...ux.intel.com, linux-hwmon@...r.kernel.org,
        dinguyen@...nel.org, devicetree@...r.kernel.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        linux-kernel@...r.kernel.org, jdelvare@...e.com, linux@...ck-us.net
Subject: Re: [PATCHv2 3/6] hwmon: (socfpga) Add hardware monitoring support
 on SoCFPGA platforms

On Tue, May 09, 2023 at 08:57:26AM +0200, Krzysztof Kozlowski wrote:
> On 08/05/2023 23:28, dinh.nguyen@...ux.intel.com wrote:

...

> > +	struct device_node *child;
> > +	int ret = 0;
> > +
> > +	for_each_child_of_node(np, child) {
> > +		ret = socfpga_probe_child_from_dt(dev, child, priv);
> > +		if (ret)
> > +			break;
> > +	}
> > +	of_node_put(child);
> 
> Hm, and if the loop does not break, is this still correct?

Yes, since NULL is okay for of_node_put(). However the explicit call inside the
if (ret) can be more obvious on what's going on.

> > +	return ret;

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ