summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/mokvar-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/mokvar-table.c')
-rw-r--r--drivers/firmware/efi/mokvar-table.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/firmware/efi/mokvar-table.c b/drivers/firmware/efi/mokvar-table.c
index d8bc01340686..38722d2009e2 100644
--- a/drivers/firmware/efi/mokvar-table.c
+++ b/drivers/firmware/efi/mokvar-table.c
@@ -180,7 +180,10 @@ void __init efi_mokvar_table_init(void)
pr_err("EFI MOKvar config table is not valid\n");
return;
}
- efi_mem_reserve(efi.mokvar_table, map_size_needed);
+
+ if (md.type == EFI_BOOT_SERVICES_DATA)
+ efi_mem_reserve(efi.mokvar_table, map_size_needed);
+
efi_mokvar_table_size = map_size_needed;
}