summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_variable_tee.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader/efi_variable_tee.c')
-rw-r--r--lib/efi_loader/efi_variable_tee.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c
index dde135fd9f8..8b6b0a39086 100644
--- a/lib/efi_loader/efi_variable_tee.c
+++ b/lib/efi_loader/efi_variable_tee.c
@@ -873,6 +873,11 @@ efi_status_t efi_query_variable_info_int(u32 attributes,
efi_status_t ret;
u8 *comm_buf;
+ if (!max_variable_storage_size ||
+ !remain_variable_storage_size ||
+ !max_variable_size || !attributes)
+ return EFI_INVALID_PARAMETER;
+
payload_size = sizeof(*mm_query_info);
comm_buf = setup_mm_hdr((void **)&mm_query_info, payload_size,
SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO,
@@ -959,11 +964,6 @@ void efi_variables_boot_exit_notify(void)
log_err("Unable to notify the MM partition for ExitBootServices\n");
free(comm_buf);
- /*
- * Populate the list for runtime variables.
- * asking EFI_VARIABLE_RUNTIME_ACCESS is redundant, since
- * efi_var_mem_notify_exit_boot_services will clean those, but that's fine
- */
ret = efi_var_collect(&var_buf, &len, EFI_VARIABLE_RUNTIME_ACCESS);
if (ret != EFI_SUCCESS)
log_err("Can't populate EFI variables. No runtime variables will be available\n");