summaryrefslogtreecommitdiff
path: root/arch/x86/platform/efi/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/platform/efi/quirks.c')
-rw-r--r--arch/x86/platform/efi/quirks.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index a25a9fd987a9..3b9fd679cea9 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
#define pr_fmt(fmt) "efi: " fmt
#include <linux/init.h>
@@ -512,6 +513,9 @@ int __init efi_reuse_config(u64 tables, int nr_tables)
void *p, *tablep;
struct efi_setup_data *data;
+ if (nr_tables == 0)
+ return 0;
+
if (!efi_setup)
return 0;
@@ -724,7 +728,7 @@ void efi_recover_from_page_fault(unsigned long phys_addr)
* Address range 0x0000 - 0x0fff is always mapped in the efi_pgd, so
* page faulting on these addresses isn't expected.
*/
- if (phys_addr >= 0x0000 && phys_addr <= 0x0fff)
+ if (phys_addr <= 0x0fff)
return;
/*