]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xive: Fix refcount leak in xive_spapr_init
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 12 May 2022 09:05:33 +0000 (13:05 +0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 22 May 2022 05:58:30 +0000 (15:58 +1000)
commit18a3aadd2ae753eda2c74c0368dec78f370648a6
tree4ae8b54c583f698031c879c9df18fe4ff0b437bb
parentd576ff290ed16d3e4dcf3685822ab3503c1df4b3
powerpc/xive: Fix refcount leak in xive_spapr_init

of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 7a69a82db40b ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220512090535.33397-1-linmq006@gmail.com
arch/powerpc/sysdev/xive/spapr.c