mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
efi_loader: Correctly account the SCRTM event creation
The result of efi_append_scrtm_version() is overwritten before anyone
checks its result. Check it and exit the function on failures
Addresses-Coverity-ID: 467399 Code maintainability issues (UNUSED_VALUE)
Fixes: commit 97707f12fd
("tpm: Support boot measurements")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
a8062549d6
commit
229f9e77fe
1 changed files with 4 additions and 1 deletions
|
@ -944,8 +944,11 @@ static efi_status_t efi_init_event_log(void)
|
|||
* Add SCRTM version to the log if previous firmmware
|
||||
* doesn't pass an eventlog.
|
||||
*/
|
||||
if (!elog.found)
|
||||
if (!elog.found) {
|
||||
ret = efi_append_scrtm_version(dev);
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto free_pool;
|
||||
}
|
||||
|
||||
ret = create_final_event();
|
||||
if (ret != EFI_SUCCESS)
|
||||
|
|
Loading…
Reference in a new issue