diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-23 13:53:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-23 13:53:21 -0700 |
commit | b51bd23c614bc5a8a905d258133246e78d611df1 (patch) | |
tree | dc6fe62a9991179b5e91dbf8c124eaf6a34d9fbf /arch | |
parent | 13bc32bad7059d6c5671e9d037e6e3ed001cc0f4 (diff) | |
parent | 533bec143a4c32f7b2014a159d0f5376226e5b4d (diff) | |
download | linux-rpi-b51bd23c614bc5a8a905d258133246e78d611df1.tar.gz linux-rpi-b51bd23c614bc5a8a905d258133246e78d611df1.tar.bz2 linux-rpi-b51bd23c614bc5a8a905d258133246e78d611df1.zip |
Merge tag 'for-linus-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross:
"A simple cleanup patch and a refcount fix for Xen on Arm"
* tag 'for-linus-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
arm/xen: Fix some refcount leaks
xen: Convert kmap() to kmap_local_page()
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/xen/enlighten.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index ec5b082f3de6..07eb69f9e7df 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -337,12 +337,15 @@ int __init arch_xen_unpopulated_init(struct resource **res) if (!nr_reg) { pr_err("No extended regions are found\n"); + of_node_put(np); return -EINVAL; } regs = kcalloc(nr_reg, sizeof(*regs), GFP_KERNEL); - if (!regs) + if (!regs) { + of_node_put(np); return -ENOMEM; + } /* * Create resource from extended regions provided by the hypervisor to be @@ -403,8 +406,8 @@ int __init arch_xen_unpopulated_init(struct resource **res) *res = &xen_resource; err: + of_node_put(np); kfree(regs); - return rc; } #endif @@ -424,8 +427,10 @@ static void __init xen_dt_guest_init(void) if (of_address_to_resource(xen_node, GRANT_TABLE_INDEX, &res)) { pr_err("Xen grant table region is not found\n"); + of_node_put(xen_node); return; } + of_node_put(xen_node); xen_grant_frames = res.start; } |