All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
Date: Sun, 21 Mar 2021 15:14:19 +0800	[thread overview]
Message-ID: <20210321071419.GA5350@80f861dc5a78> (raw)
In-Reply-To: <202103211551.H9TYAXa6-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
CC: Frank Rowand <frowand.list@gmail.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/of/overlay.c:788:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 799.


Semantic patch information:
 False positives can be due to function calls within the for_each
 loop that may encapsulate an of_node_put.

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>
---

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

Please take the patch only if it's a positive warning. Thanks!

 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;
 		}
 

  reply	other threads:[~2021-03-21  7:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21  7:14 drivers/of/overlay.c:788:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 799 kernel test robot
2021-03-21  7:14 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-03  9:43 arch/powerpc/kexec/core_64.c:54:1-22: WARNING: Function "for_each_node_by_type" should have of_node_put() before return around line 68 kernel test robot
2021-08-03  9:43 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2021-06-23 14:01 drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1149:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before break around line 1184 kernel test robot
2021-06-23 14:02 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2021-03-27 14:34 sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352 kernel test robot
2021-03-27 14:34 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2021-01-20 14:17 drivers/usb/gadget/udc/aspeed-vhub/hub.c:982:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before break around line 1003 kernel test robot
2021-01-20 14:17 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2020-11-22 20:01 net/dsa/dsa2.c:738:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before goto around lines 741 kernel test robot
2020-11-22 20:01 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot

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=20210321071419.GA5350@80f861dc5a78 \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.