aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLv Ruyi2022-04-02 01:34:19 +0000
committerMichael Ellerman2022-05-22 15:58:30 +1000
commit5dd9e27ea4a39f7edd4bf81e9e70208e7ac0b7c9 (patch)
treed26986b7c526e8cd9ab336964ccee98fb8c7d279
parentab0cc6bbf0c812731c703ec757fcc3fc3a457a34 (diff)
powerpc/xics: fix refcount leak in icp_opal_init()
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
-rw-r--r--arch/powerpc/sysdev/xics/icp-opal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xics/icp-opal.c b/arch/powerpc/sysdev/xics/icp-opal.c
index bda4c32582d9..4dae624b9f2f 100644
--- a/arch/powerpc/sysdev/xics/icp-opal.c
+++ b/arch/powerpc/sysdev/xics/icp-opal.c
@@ -196,6 +196,7 @@ int __init icp_opal_init(void)
printk("XICS: Using OPAL ICP fallbacks\n");
+ of_node_put(np);
return 0;
}