All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] drm: xlnx: sdi: fix for_each_child.cocci warnings
Date: Thu, 15 Jul 2021 01:03:56 +0800	[thread overview]
Message-ID: <20210714170356.GA35284@d85af71574bd> (raw)
In-Reply-To: <202107150144.tbCclRXY-lkp@intel.com>

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

CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Vishal Sagar <vishal.sagar@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Hyun Kwon <hyun.kwon@xilinx.com>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
CC: David Airlie <airlied@linux.ie>
CC: Daniel Vetter <daniel@ffwll.ch>
CC: dri-devel(a)lists.freedesktop.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/gpu/drm/xlnx/xlnx_sdi.c:1098:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 1112.
drivers/gpu/drm/xlnx/xlnx_sdi.c:1098:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 1120.


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: a43ca56eb122 ("drm: xlnx: sdi: Add clock framework support")
CC: Vishal Sagar <vishal.sagar@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head:   f6f032f82f0a13def702a0154df535db88f43391
commit: a43ca56eb1228aed11dd81e74a8138684ca3bac9 [478/1756] drm: xlnx: sdi: Add clock framework support
:::::: branch date: 9 hours ago
:::::: commit date: 7 weeks ago

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

 xlnx_sdi.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/gpu/drm/xlnx/xlnx_sdi.c
+++ b/drivers/gpu/drm/xlnx/xlnx_sdi.c
@@ -1109,6 +1109,7 @@ static int xlnx_sdi_probe(struct platfor
 			dev_err(dev, "No remote port at %s\n", port->name);
 			of_node_put(endpoint);
 			ret = -EINVAL;
+			of_node_put(port);
 			goto err_disable_vidin_clk;
 		}
 
@@ -1117,6 +1118,7 @@ static int xlnx_sdi_probe(struct platfor
 		ret = of_property_read_u32(port, "reg", &index);
 		if (ret) {
 			dev_err(dev, "reg property not present - %d\n", ret);
+			of_node_put(port);
 			goto err_disable_vidin_clk;
 		}
 

  reply	other threads:[~2021-07-14 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 17:03 [xlnx:xlnx_rebase_v5.10 478/1756] drivers/gpu/drm/xlnx/xlnx_sdi.c:1098:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 1112 kernel test robot
2021-07-14 17:03 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-10  3:03 [xilinx-xlnx:xlnx_rebase_v5.15 635/907] drivers/gpu/drm/xlnx/xlnx_sdi.c:1311:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 1325 kernel test robot
2022-02-10  2:58 ` [PATCH] drm: xlnx: sdi: fix for_each_child.cocci warnings kernel test robot
2022-02-13  5:44 [xilinx-xlnx:xlnx_rebase_v5.15 635/923] drivers/gpu/drm/xlnx/xlnx_sdi.c:1311:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 1325 kernel test robot
2022-02-13  5:40 ` [PATCH] drm: xlnx: sdi: fix for_each_child.cocci warnings kernel test robot
2022-06-28 13:18 [xilinx-xlnx:xlnx_rebase_v5.15_LTS 635/1197] drivers/gpu/drm/xlnx/xlnx_sdi.c:1311:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 1325 kernel test robot
2022-06-28 13:01 ` [PATCH] drm: xlnx: sdi: 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=20210714170356.GA35284@d85af71574bd \
    --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.