linux-stable/drivers/misc/cxl
Miaoqian Lin 2d7b658038 cxl: Fix refcount leak in cxl_calc_capp_routing
[ Upstream commit 1d09697ff2 ]

of_get_next_parent() returns a node pointer with refcount incremented,
we should use of_node_put() on it when not need anymore.
This function only calls of_node_put() in normal path,
missing it in the error path.
Add missing of_node_put() to avoid refcount leak.

Fixes: f24be42aab ("cxl: Add psl9 specific code")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220605060038.62217-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:50 +01:00
..
api.c
base.c
context.c cxl: Use the bitmap API to allocate bitmaps 2022-07-14 16:53:52 +02:00
cxl.h
cxllib.c
debugfs.c
fault.c cxl: remove vma linked list walk 2022-09-26 19:46:20 -07:00
file.c
flash.c
guest.c cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter() 2022-12-31 13:32:40 +01:00
hcalls.c
hcalls.h
irq.c cxl: Fix a memory leak in an error handling path 2022-07-14 16:53:52 +02:00
Kconfig
main.c
Makefile
native.c
of.c cxl: Use the bitmap API to allocate bitmaps 2022-07-14 16:53:52 +02:00
pci.c cxl: Fix refcount leak in cxl_calc_capp_routing 2022-12-31 13:32:50 +01:00
sysfs.c
trace.c
trace.h
vphb.c