Content-Type: multipart/mixed; boundary="===============7610136623436190070==" MIME-Version: 1.0 From: Frank Rowand To: 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 Message-ID: <2783d37c-cdb7-9d86-a5e0-07bc523854c1@gmail.com> In-Reply-To: List-Id: --===============7610136623436190070== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 3/22/21 1:21 PM, Julia Lawall wrote: > From: kernel test robot > = > 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 scr= ipt") > CC: Sumera Priyadarsini > Reported-by: kernel test robot > Signed-off-by: kernel test robot > Signed-off-by: Julia Lawall > --- > = > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t master > head: 812da4d39463a060738008a46cfc9f775e4bfcf6 > commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: A= dd 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 =3D -EINVAL; > + of_node_put(node); > goto err_free_fragments; > } > = Reviewed-by: Frank Rowand Tested-by: Frank Rowand 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 --===============7610136623436190070==--