Joel Kitching has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34790 )
Change subject: vboot: fix conditional using vboot_setup_tpm return value ......................................................................
vboot: fix conditional using vboot_setup_tpm return value
vboot_setup_tpm returns (TPM_SUCCESS == 0) on success. In this case, call antirollback_read_space_firmware.
BUG=b:139101213 TEST=make clean && make test-abuild BRANCH=none
Change-Id: Ifdea1d85167a50a1ada5afe9b107408e3a2e0d6f Signed-off-by: Joel Kitching kitching@google.com --- M src/security/vboot/vboot_logic.c 1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/34790/1
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c index c61d6be..30c288a 100644 --- a/src/security/vboot/vboot_logic.c +++ b/src/security/vboot/vboot_logic.c @@ -335,8 +335,7 @@ * check the return value here because vb2api_fw_phase1 will catch * invalid secdata and tell us what to do (=reboot). */ timestamp_add_now(TS_START_TPMINIT); - rv = vboot_setup_tpm(&ctx); - if (rv) + if (TPM_SUCCESS == vboot_setup_tpm(&ctx)) antirollback_read_space_firmware(&ctx); timestamp_add_now(TS_END_TPMINIT);