[RFC v2 09/13] efi/arm: Check return value of init_new_context()
Kristina Martšenko
kristina.martsenko at arm.com
Thu Nov 26 03:49:32 PST 2026
init_new_context() will soon be able to return an error. Check for
errors before continuing.
Acked-by: Ard Biesheuvel <ardb at kernel.org>
Signed-off-by: Kristina Martšenko <kristina.martsenko at arm.com>
---
drivers/firmware/efi/arm-runtime.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
index 3167cab62014..054a110986c5 100644
--- a/drivers/firmware/efi/arm-runtime.c
+++ b/drivers/firmware/efi/arm-runtime.c
@@ -55,7 +55,8 @@ static bool __init efi_virtmap_init(void)
efi_mm.pgd = pgd_alloc(&efi_mm);
mm_init_cpumask(&efi_mm);
- init_new_context(NULL, &efi_mm);
+ if (WARN_ON(init_new_context(NULL, &efi_mm)))
+ return false;
for_each_efi_memory_desc(md) {
phys_addr_t phys = md->phys_addr;
--
2.43.0
More information about the linux-arm-kernel
mailing list