diff options
| -rw-r--r-- | drivers/firmware/efi/libstub/secureboot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/secureboot.c b/drivers/firmware/efi/libstub/secureboot.c index 6def402bf569..5da36e56b36a 100644 --- a/drivers/firmware/efi/libstub/secureboot.c +++ b/drivers/firmware/efi/libstub/secureboot.c | |||
| @@ -45,6 +45,8 @@ enum efi_secureboot_mode efi_get_secureboot(efi_system_table_t *sys_table_arg) | |||
| 45 | size = sizeof(secboot); | 45 | size = sizeof(secboot); |
| 46 | status = get_efi_var(efi_SecureBoot_name, &efi_variable_guid, | 46 | status = get_efi_var(efi_SecureBoot_name, &efi_variable_guid, |
| 47 | NULL, &size, &secboot); | 47 | NULL, &size, &secboot); |
| 48 | if (status == EFI_NOT_FOUND) | ||
| 49 | return efi_secureboot_mode_disabled; | ||
| 48 | if (status != EFI_SUCCESS) | 50 | if (status != EFI_SUCCESS) |
| 49 | goto out_efi_err; | 51 | goto out_efi_err; |
| 50 | 52 | ||
| @@ -78,7 +80,5 @@ secure_boot_enabled: | |||
| 78 | 80 | ||
| 79 | out_efi_err: | 81 | out_efi_err: |
| 80 | pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot status.\n"); | 82 | pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot status.\n"); |
| 81 | if (status == EFI_NOT_FOUND) | ||
| 82 | return efi_secureboot_mode_disabled; | ||
| 83 | return efi_secureboot_mode_unknown; | 83 | return efi_secureboot_mode_unknown; |
| 84 | } | 84 | } |
