Skip to contentSkip to conversation

lib: fix for_each_child.cocci warnings

PATCH In review Julia Lawall 2 participants 2 messages May 11, 2021 – May 17, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: fix for_each_child.cocci warnings

From: kernel test robot <[email protected]>

For_each_available_child_of_node should have of_node_put() before return around line 1121.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Fixes 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC Julian Braha <[email protected]>

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS

:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago

 mcde_dsi.c |    1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mcde/mcde_dsi.c +1 -0
@@ -1118,6 +1118,7 @@ static int mcde_dsi_bind(struct device *
 			bridge = of_drm_find_bridge(child);
 			if (!bridge) {
 				dev_err(dev, "failed to find bridge\n");
+				of_node_put(child);
 				return -EINVAL;
 			}
 		}
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Julia Lawall

From: kernel test robot <[email protected]>

For_each_available_child_of_node should have of_node_put() before return around line 1121.

Quoted 7 lines

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Fixes 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC Julian Braha <[email protected]>

Shall I apply it to the DRM tree or do you plan on funneling it some other way?

Yours,
Linus Walleij