mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-24 14:25:56 +00:00
efi_loader: simplify efi_tcg2_hash_log_extend_event()
The value of variable nt is never used. Just use NULL when calling efi_check_pe(). The API function is not expected to write to the console. Such output might have unwanted side effects on the screen layout of an EFI application. Leave error handling to the caller. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
52c0e5f8a3
commit
a152e14999
1 changed files with 1 additions and 4 deletions
|
@ -607,12 +607,9 @@ efi_tcg2_hash_log_extend_event(struct efi_tcg2_protocol *this, u64 flags,
|
|||
* Format"
|
||||
*/
|
||||
if (flags & PE_COFF_IMAGE) {
|
||||
IMAGE_NT_HEADERS32 *nt;
|
||||
|
||||
ret = efi_check_pe((void *)(uintptr_t)data_to_hash,
|
||||
data_to_hash_len, (void **)&nt);
|
||||
data_to_hash_len, NULL);
|
||||
if (ret != EFI_SUCCESS) {
|
||||
log_err("Not a valid PE-COFF file\n");
|
||||
ret = EFI_UNSUPPORTED;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue