From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: dinh.nguyen@linux.intel.com, linux-hwmon@vger.kernel.org,
dinguyen@kernel.org, devicetree@vger.kernel.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
linux-kernel@vger.kernel.org, jdelvare@suse.com,
linux@roeck-us.net
Subject: Re: [PATCHv2 3/6] hwmon: (socfpga) Add hardware monitoring support on SoCFPGA platforms
Date: Fri, 12 May 2023 14:11:45 +0300 [thread overview]
Message-ID: <ZF4e8YdAqHwmONzS@smile.fi.intel.com> (raw)
In-Reply-To: <9459547a-0ff9-9972-602d-3098b616602b@linaro.org>
On Tue, May 09, 2023 at 08:57:26AM +0200, Krzysztof Kozlowski wrote:
> On 08/05/2023 23:28, dinh.nguyen@linux.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
next prev parent reply other threads:[~2023-05-12 11:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 21:28 [PATCHv2 1/6] units: add a macro for MILLIVOLT_PER_VOLT dinh.nguyen
2023-05-08 21:28 ` [PATCHv2 2/6] firmware: stratix10-svc: add method for reading voltage and temperature dinh.nguyen
2023-05-08 21:28 ` [PATCHv2 3/6] hwmon: (socfpga) Add hardware monitoring support on SoCFPGA platforms dinh.nguyen
2023-05-09 0:57 ` Armin Wolf
2023-05-25 20:47 ` Dinh Nguyen
2023-05-09 6:57 ` Krzysztof Kozlowski
2023-05-12 11:11 ` Andy Shevchenko [this message]
2023-05-25 21:20 ` Dinh Nguyen
2023-05-27 8:28 ` Andy Shevchenko
2023-05-08 21:28 ` [PATCHv2 4/6] MAINTAINERS: add Dinh Nguyen for socfpga-hwmon driver dinh.nguyen
2023-05-08 21:28 ` [PATCHv2 5/6] dt-bindings: hwmon: intel: add hardware monitor bindings for SoCFPGA dinh.nguyen
2023-05-09 7:01 ` Krzysztof Kozlowski
2023-05-08 21:28 ` [PATCHv2 6/6] arm64: dts: socfpga: add hwmon properties dinh.nguyen
2023-05-09 7:04 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZF4e8YdAqHwmONzS@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=dinh.nguyen@linux.intel.com \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox