diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-12 04:34:58 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-16 18:05:16 +0300 |
commit | adbfe8edc3389ba635229195a95217d8b0dfa182 (patch) | |
tree | 8c797c6250085e213bc9f8907cc8ca3d4152525b /lib | |
parent | bb2c9a30c23752accd53119d3964f6e6d1ae4f32 (diff) | |
download | u-boot-adbfe8edc3389ba635229195a95217d8b0dfa182.tar.xz |
efi: Correct assumption about if_type
efi_set_blk_dev_to_system_partition() assumes that 0 is an invalid
if_type. This is true now but is about to be false. Fix this bug to avoid
a test failure.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_var_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c index 76a2ff9e41..994e66392f 100644 --- a/lib/efi_loader/efi_var_file.c +++ b/lib/efi_loader/efi_var_file.c @@ -38,7 +38,7 @@ static efi_status_t __maybe_unused efi_set_blk_dev_to_system_partition(void) char part_str[PART_STR_LEN]; int r; - if (!efi_system_partition.if_type) { + if (efi_system_partition.if_type == UCLASS_INVALID) { log_err("No EFI system partition\n"); return EFI_DEVICE_ERROR; } |