ARM: versatile: Add missing of_node_put in dcscb_init
authorPeng Wu <wupeng58@huawei.com>
Thu, 28 Apr 2022 23:03:56 +0000 (01:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:53:46 +0000 (16:53 +0200)
commitbbdfb7d4f036118d36415a2575efa6f5246505ae
treecdd593a48550fe160cb410154ea6fcf716ad381f
parent4b5541035b59dfe77584e7fb5e283c4e00af5a25
ARM: versatile: Add missing of_node_put in dcscb_init

[ Upstream commit 23b44f9c649bbef10b45fa33080cd8b4166800ae ]

The device_node pointer is returned by of_find_compatible_node
with refcount incremented. We should use of_node_put() to avoid
the refcount leak.

Signed-off-by: Peng Wu <wupeng58@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220428230356.69418-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-vexpress/dcscb.c