From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8074278964738937595==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] drm: xlnx: sdi: fix for_each_child.cocci warnings Date: Thu, 15 Jul 2021 01:03:56 +0800 Message-ID: <20210714170356.GA35284@d85af71574bd> In-Reply-To: <202107150144.tbCclRXY-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============8074278964738937595== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: linux-arm-kernel(a)lists.infradead.org TO: Vishal Sagar CC: Michal Simek CC: Hyun Kwon CC: Laurent Pinchart CC: David Airlie CC: Daniel Vetter CC: dri-devel(a)lists.freedesktop.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/gpu/drm/xlnx/xlnx_sdi.c:1098:1-23: WARNING: Function "for_each_chil= d_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_chil= d_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 Reported-by: kernel test robot Signed-off-by: kernel test robot --- 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 =3D -EINVAL; + of_node_put(port); goto err_disable_vidin_clk; } = @@ -1117,6 +1118,7 @@ static int xlnx_sdi_probe(struct platfor ret =3D 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; } =20 --===============8074278964738937595==--