]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: cns3xxx: Fix refcount leak in cns3xxx_init
authorMiaoqian Lin <linmq006@gmail.com>
Sun, 5 Jun 2022 07:58:41 +0000 (11:58 +0400)
committerArnd Bergmann <arnd@arndb.de>
Fri, 24 Jun 2022 15:18:30 +0000 (17:18 +0200)
commit37c6c8eefb52b6c485de64f8cee5dbec3cc8a0a5
treebea001871173e7d3df0d22aa54e17cec745bcfeb
parent65c53a616771382fc8fd94171f643b555d7477da
ARM: cns3xxx: Fix refcount leak in cns3xxx_init

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: 9220d42560ea ("ARM: cns3xxx: initial DT support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-cns3xxx/core.c