Skip to content

Commit

Permalink
powerpc/powernv: fix missing of_node_put in uv_init()
Browse files Browse the repository at this point in the history
[ Upstream commit 3ffa9fd ]

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>
  • Loading branch information
Lv Ruyi authored and gregkh committed Jun 9, 2022
1 parent 2357bd7 commit 8e53018
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/platforms/powernv/ultravisor.c
Expand Up @@ -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;

Expand Down

0 comments on commit 8e53018

Please sign in to comment.