From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5870314585193210149==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] drm: of: fix device_node_continue.cocci warnings Date: Sun, 03 Apr 2022 02:36:17 +0800 Message-ID: In-Reply-To: <202204030210.J2kMG0rF-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============5870314585193210149== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org BCC: lkp(a)intel.com CC: Linux Memory Management List TO: Paul Kocialkowski CC: Maxime Ripard CC: Maarten Lankhorst CC: Thomas Zimmermann 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/drm_of.c:297:2-13: ERROR: probable double put. Device node iterators put the previous value of the index variable, so an explicit put causes a double put. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci Fixes: 67bae5f28c89 ("drm: of: Properly try all possible cases for bridge/p= anel detection") CC: Paul Kocialkowski Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git= master head: e5071887cd2296a7704dbcd10c1cedf0f11cdbd5 commit: 67bae5f28c895f8737a1974c3f31cf12b9170b14 [14515/15002] drm: of: Pro= perly try all possible cases for bridge/panel detection :::::: branch date: 2 days ago :::::: commit date: 3 days ago Please take the patch only if it's a positive warning. Thanks! drivers/gpu/drm/drm_of.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -294,7 +294,6 @@ int drm_of_find_panel_or_bridge(const st continue; = ret =3D find_panel_or_bridge(node, panel, bridge); - of_node_put(node); = /* Stop at the first found occurrence. */ if (!ret) --===============5870314585193210149==--