Commit 1227fd1e authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Zheng Zengkai
Browse files

ARM: cns3xxx: Fix refcount leak in cns3xxx_init

stable inclusion
from stable-v5.10.127
commit c980392af1473d6d5662f70d8089c8e6d85144a4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5XDDK

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



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

commit 1ba904b6 upstream.

of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 415f5914 ("ARM: cns3xxx: initial DT support")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Acked-by: default avatarKrzysztof Halasa <khalasa@piap.pl>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 0c58fab4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment