arm/xen: Fix some refcount leaks
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 20 Apr 2022 01:49:13 +0000 (01:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:41:13 +0000 (14:41 +0200)
commitbbcd02679d7b909186e143ef30a24eb923d19104
tree51c3f90188d71fbc4b67701713ce5cd4397cc719
parent9b6308dce8e50f5195d8f94a226141804da9f8e2
arm/xen: Fix some refcount leaks

[ Upstream commit 533bec143a4c32f7b2014a159d0f5376226e5b4d ]

The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.

Fixes: 9b08aaa3199a ("ARM: XEN: Move xen_early_init() before efi_init()")
Fixes: b2371587fe0c ("arm/xen: Read extended regions from DT and init Xen resource")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/xen/enlighten.c