summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_capsule.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader/efi_capsule.c')
-rw-r--r--lib/efi_loader/efi_capsule.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 635088f25a1..f8a4a7c6ef4 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -20,6 +20,7 @@
#include <sort.h>
#include <sysreset.h>
#include <asm/global_data.h>
+#include <u-boot/uuid.h>
#include <crypto/pkcs7.h>
#include <crypto/pkcs7_parser.h>
@@ -563,9 +564,14 @@ static efi_status_t efi_capsule_update_firmware(
bool fw_accept_os;
if (IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
- if (fwu_empty_capsule_checks_pass() &&
- fwu_empty_capsule(capsule_data))
- return fwu_empty_capsule_process(capsule_data);
+ if (fwu_empty_capsule(capsule_data)) {
+ if (fwu_empty_capsule_checks_pass()) {
+ return fwu_empty_capsule_process(capsule_data);
+ } else {
+ log_err("FWU empty capsule checks failed. Cannot start update\n");
+ return EFI_INVALID_PARAMETER;
+ }
+ }
if (!fwu_update_checks_pass()) {
log_err("FWU checks failed. Cannot start update\n");