Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 537a317e authored by Lv Ruyi's avatar Lv Ruyi Committed by Greg Kroah-Hartman
Browse files

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarLv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220402013419.2410298-1-lv.ruyi@zte.com.cn


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a910e961
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -195,6 +195,7 @@ int icp_opal_init(void)


	printk("XICS: Using OPAL ICP fallbacks\n");
	printk("XICS: Using OPAL ICP fallbacks\n");


	of_node_put(np);
	return 0;
	return 0;
}
}