From c4d74f0f978ed5ceee62cd3f6708081042e582a1 Mon Sep 17 00:00:00 2001 From: kernel test robot Date: Mon, 22 Mar 2021 19:21:39 +0100 Subject: of: overlay: fix for_each_child.cocci warnings Function "for_each_child_of_node" should have of_node_put() before goto. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script") CC: Sumera Priyadarsini Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103221918450.2918@hadrien Signed-off-by: Rob Herring --- drivers/of/overlay.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/of/overlay.c') diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 1c867a5e4c7c..c25679f7bd3f 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -796,6 +796,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, if (!fragment->target) { of_node_put(fragment->overlay); ret = -EINVAL; + of_node_put(node); goto err_free_fragments; } -- cgit v1.2.3