Commit 0736d146 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Zheng Zengkai
Browse files

power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe

stable inclusion
from stable-v5.10.134
commit 493ceca3271316e74639c89ff8ac35883de64256
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZVR7

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=493ceca3271316e74639c89ff8ac35883de64256



--------------------------------

[ Upstream commit 80192eff ]

of_find_matching_node_and_match() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: 0e545f57 ("power: reset: driver for the Versatile syscon reboot")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent aa098100
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment