All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] lib: fix for_each_child.cocci warnings
Date: Tue, 11 May 2021 21:32:49 +0800	[thread overview]
Message-ID: <20210511133249.GA66480@aa99e9a73b10> (raw)
In-Reply-To: <202105112137.xmT6aDLF-lkp@intel.com>

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Julian Braha <julianbraha@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

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

drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121.


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: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC: Julian Braha <julianbraha@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:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago

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

 mcde_dsi.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1118,6 +1118,7 @@ static int mcde_dsi_bind(struct device *
 			bridge = of_drm_find_bridge(child);
 			if (!bridge) {
 				dev_err(dev, "failed to find bridge\n");
+				of_node_put(child);
 				return -EINVAL;
 			}
 		}

  reply	other threads:[~2021-05-11 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 13:32 drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121 kernel test robot
2021-05-11 13:32 ` kernel test robot [this message]
2021-05-11 20:46 [PATCH] lib: fix for_each_child.cocci warnings Julia Lawall
2021-05-11 20:46 ` Julia Lawall
2021-05-11 20:46 ` Julia Lawall
2021-05-17 22:08 ` Linus Walleij
2021-05-17 22:08   ` Linus Walleij
2021-05-17 22:08   ` Linus Walleij

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=20210511133249.GA66480@aa99e9a73b10 \
    --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.