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>
Tue, 14 Jun 2022 14:53:47 +0000 (16:53 +0200)
commit53f3f7f73e609b934083f896cb7ca2c2cb009b9f
tree2b3814a9e6fd98a7010f9eb788a3466530c0aef1
parent232db3526cdd1d286cf15a5230bcfa51ca8d4774
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