lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.18 245/879] powerpc/powernv: fix missing of_node_put in uv_init()
    Date
    From: Lv Ruyi <lv.ruyi@zte.com.cn>

    [ Upstream commit 3ffa9fd471f57f365bc54fc87824c530422f64a5 ]

    of_find_compatible_node() returns node pointer with refcount incremented,
    use of_node_put() on it when done.

    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20220407090043.2491854-1-lv.ruyi@zte.com.cn
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/powerpc/platforms/powernv/ultravisor.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/arch/powerpc/platforms/powernv/ultravisor.c b/arch/powerpc/platforms/powernv/ultravisor.c
    index e4a00ad06f9d..67c8c4b2d8b1 100644
    --- a/arch/powerpc/platforms/powernv/ultravisor.c
    +++ b/arch/powerpc/platforms/powernv/ultravisor.c
    @@ -55,6 +55,7 @@ static int __init uv_init(void)
    return -ENODEV;

    uv_memcons = memcons_init(node, "memcons");
    + of_node_put(node);
    if (!uv_memcons)
    return -ENOENT;

    --
    2.35.1


    \
     
     \ /
      Last update: 2022-06-08 00:27    [W:4.057 / U:0.192 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site