devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Julia Lawall <julia.lawall@inria.fr>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sumera Priyadarsini <sylphrenadin@gmail.com>,
	kbuild-all@lists.01.org
Subject: Re: [PATCH] of: overlay: fix for_each_child.cocci warnings
Date: Mon, 22 Mar 2021 17:02:04 -0500	[thread overview]
Message-ID: <2783d37c-cdb7-9d86-a5e0-07bc523854c1@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2103221918450.2918@hadrien>

On 3/22/21 1:21 PM, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
> 
> Function "for_each_child_of_node" should have of_node_put() before goto.
> 
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
> 
> Fixes: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
> CC: Sumera Priyadarsini <sylphrenadin@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   812da4d39463a060738008a46cfc9f775e4bfcf6
> commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
> :::::: branch date: 13 hours ago
> :::::: commit date: 5 months ago
> 
>  overlay.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -796,6 +796,7 @@ static int init_overlay_changeset(struct
>  		if (!fragment->target) {
>  			of_node_put(fragment->overlay);
>  			ret = -EINVAL;
> +			of_node_put(node);
>  			goto err_free_fragments;
>  		}
> 

Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Tested-by: Frank Rowand <frank.rowand@sony.com>

While reading through the code touched by the patch I noticed that
the clean up at label err_free_fragments does not do the required
of_node_put() calls.  I'll add creating a patch to fix that to my
todo list.

-Frank

  reply	other threads:[~2021-03-22 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 18:21 [PATCH] of: overlay: fix for_each_child.cocci warnings Julia Lawall
2021-03-22 22:02 ` Frank Rowand [this message]
2021-03-24 20:00 ` Rob Herring

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=2783d37c-cdb7-9d86-a5e0-07bc523854c1@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=julia.lawall@inria.fr \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    --cc=sylphrenadin@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).