summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/efi-bgrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/efi-bgrt.c')
-rw-r--r--drivers/firmware/efi/efi-bgrt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
index 04ca8764f0c0..8bf27323f7a3 100644
--- a/drivers/firmware/efi/efi-bgrt.c
+++ b/drivers/firmware/efi/efi-bgrt.c
@@ -36,6 +36,9 @@ void __init efi_bgrt_init(struct acpi_table_header *table)
if (acpi_disabled)
return;
+ if (!efi_enabled(EFI_BOOT))
+ return;
+
if (table->length < sizeof(bgrt_tab)) {
pr_notice("Ignoring BGRT: invalid length %u (expected %zu)\n",
table->length, sizeof(bgrt_tab));