lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 300/530] of: overlay: fix for_each_child.cocci warnings
    Date
    From: kernel test robot <lkp@intel.com>

    [ Upstream commit c4d74f0f978ed5ceee62cd3f6708081042e582a1 ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/of/overlay.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
    index 50bbe0edf538..43a77d720008 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;
    }

    --
    2.30.2


    \
     
     \ /
      Last update: 2021-05-12 19:01    [W:2.082 / U:0.308 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site