summaryrefslogtreecommitdiffstats
path: root/kernel/arch/x86/platform
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/x86/platform')
-rw-r--r--kernel/arch/x86/platform/efi/efi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/arch/x86/platform/efi/efi.c b/kernel/arch/x86/platform/efi/efi.c
index 02744df57..841ea05e1 100644
--- a/kernel/arch/x86/platform/efi/efi.c
+++ b/kernel/arch/x86/platform/efi/efi.c
@@ -946,6 +946,11 @@ u64 efi_mem_attributes(unsigned long phys_addr)
static int __init arch_parse_efi_cmdline(char *str)
{
+ if (!str) {
+ pr_warn("need at least one option\n");
+ return -EINVAL;
+ }
+
if (parse_option_str(str, "old_map"))
set_bit(EFI_OLD_MEMMAP, &efi.flags);
if (parse_option_str(str, "debug"))