summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-06-02 20:06:13 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2019-06-02 20:06:13 +0200
commitaf0424522dbb235ee7f1eb84bce074004c9d8b51 (patch)
treec1894636cdd4e954c0a89d2741998b1f5227c728 /drivers/firmware
parentMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ke... (diff)
parentefi: Allow the number of EFI configuration tables entries to be zero (diff)
downloadlinux-af0424522dbb235ee7f1eb84bce074004c9d8b51.tar.xz
linux-af0424522dbb235ee7f1eb84bce074004c9d8b51.zip
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fixes from Ingo Molnar: "Two EFI fixes: a quirk for weird systabs, plus add more robust error handling in the old 1:1 mapping code" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Allow the number of EFI configuration tables entries to be zero efi/x86/Add missing error handling to old_memmap 1:1 mapping code
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efi/efi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 55b77c576c42..521a541d02ad 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -636,6 +636,9 @@ int __init efi_config_init(efi_config_table_type_t *arch_tables)
void *config_tables;
int sz, ret;
+ if (efi.systab->nr_tables == 0)
+ return 0;
+
if (efi_enabled(EFI_64BIT))
sz = sizeof(efi_config_table_64_t);
else