Content-Type: multipart/mixed; boundary="===============7259795479877929261==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] BACKPORT: FROMLIST: drm: bridge: fix device_node_continue.cocci warnings (fwd) Date: Mon, 06 Jan 2020 13:11:49 +0100 Message-ID: List-Id: --===============7259795479877929261== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot 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: dc857bb84572 ("BACKPORT: FROMLIST: drm: bridge: Generic GPIO mux dri= ver") CC: Nicolas Boichat Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- Hello, I'm not sure if the patch is correct. The change on line 213 does look correct. of_node_put is normally not needed before a continue, because the iterator is going to do a put as well. Perhaps the one on line 236 has that property as well, but there is not enough context in the proposed patch to see the issue. In any case, I signed off on the patch in case it turns out to be useful. julia tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chr= omeos-4.19 head: 8dffe065b46fe2708c6b33ccfebf93c5309d500b commit: dc857bb845724812ebbe07713be62df11a42e262 [11/12] BACKPORT: FROMLIST= : drm: bridge: Generic GPIO mux driver :::::: branch date: 14 hours ago :::::: commit date: 14 hours ago Please take the patch only if it's a positive warning. Thanks! generic-gpio-mux.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/gpu/drm/bridge/generic-gpio-mux.c +++ b/drivers/gpu/drm/bridge/generic-gpio-mux.c @@ -210,7 +210,6 @@ static int gpio_display_mux_probe(struct for_each_child_of_node(port, ep) { if (!ep->name || (of_node_cmp(ep->name, "endpoint") !=3D 0)) { - of_node_put(ep); continue; } @@ -233,7 +232,6 @@ static int gpio_display_mux_probe(struct of_node_put(port); return -EINVAL; } - of_node_put(ep); if (of_device_is_compatible(remote, "hdmi-connector")) { of_node_put(remote); --===============7259795479877929261==--