powerpc/xics: fix refcount leak in icp_opal_init()
authorLv Ruyi <lv.ruyi@zte.com.cn>
Sat, 2 Apr 2022 01:34:19 +0000 (01:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:43 +0000 (10:22 +0200)
commitdf802880a7f9cd96b921b00639b00871f18a9a57
tree45f4924588c970f46b9626e37db0c6dac918af31
parentce29ea35402dd407ea8fa56e3bee676df9bad3b2
powerpc/xics: fix refcount leak in icp_opal_init()

[ Upstream commit 5dd9e27ea4a39f7edd4bf81e9e70208e7ac0b7c9 ]

The of_find_compatible_node() function returns a 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/20220402013419.2410298-1-lv.ruyi@zte.com.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/xics/icp-opal.c