From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6143125603480516490==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] drm: xlnx: sdi: fix for_each_child.cocci warnings Date: Sun, 13 Feb 2022 13:40:37 +0800 Message-ID: <20220213054037.GA65792@00bcc9f45bcd> In-Reply-To: <202202131335.2EfKfFom-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============6143125603480516490== 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: Saurabh Sengar 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:1311:1-23: WARNING: Function "for_each_chil= d_of_node" should have of_node_put() before goto around lines 1325. drivers/gpu/drm/xlnx/xlnx_sdi.c:1311:1-23: WARNING: Function "for_each_chil= d_of_node" should have of_node_put() before goto around lines 1333. 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 CC: Saurabh Sengar Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15 head: 966124532656bc95d781abf57531e4cd4f962237 commit: eedc9b61ce549e6a1af512cc21dfd7fa487d0823 [635/923] drm: xlnx: sdi: = Adding sdi-tx driver :::::: branch date: 3 days ago :::::: commit date: 12 days 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 @@ -1322,6 +1322,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; } = @@ -1330,6 +1331,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 --===============6143125603480516490==--