diff options
author | kernel test robot <lkp@intel.com> | 2021-03-22 21:21:39 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-03-24 23:12:16 +0300 |
commit | c4d74f0f978ed5ceee62cd3f6708081042e582a1 (patch) | |
tree | 11e28c0c69d4680f76a2400294d15829eb8bc7ce /drivers/of/overlay.c | |
parent | 709e8c99208e64c450e04347e8ac5be57d4d4a4d (diff) |
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 <sylphrenadin@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Tested-by: Frank Rowand <frank.rowand@sony.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103221918450.2918@hadrien
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/overlay.c')
-rw-r--r-- | drivers/of/overlay.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |