From: Sascha Hauer <s.hauer@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>
Cc: barebox@lists.infradead.org, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH] of: use of_get_child_by_name() to find child node
Date: Tue, 14 Apr 2020 11:13:18 +0200 [thread overview]
Message-ID: <20200414091318.GZ27288@pengutronix.de> (raw)
In-Reply-To: <20200414090610.9119-1-m.tretter@pengutronix.de>
On Tue, Apr 14, 2020 at 11:06:10AM +0200, Michael Tretter wrote:
> After iterating the children of a node with for_each_child_of_node(),
> the child node will never be NULL. If the node was not found,
> overlay_child will always point to the first element in the list, which
> might or might not be the node that was searched.
>
> Use the of_get_child_by_name() helper function to find the child node
> with the name, which does the right thing and returns NULL if the node
> is not found.
>
> Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
> drivers/of/resolver.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2020-04-14 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 9:06 Michael Tretter
2020-04-14 9:13 ` Sascha Hauer [this message]
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=20200414091318.GZ27288@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.tretter@pengutronix.de \
/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