diff options
author | Joel Kitching <kitching@google.com> | 2019-08-08 14:20:26 +0800 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2019-08-08 07:03:24 +0000 |
commit | 2a20d13c3935f826a71c635d07dd142bfd84d9dd (patch) | |
tree | c327e2c2bd885636b7421b0ca31245a4603c8558 /src/security | |
parent | 2524928f5d75b9f2d9215d98905734becb49a5d3 (diff) |
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.
This regression was introduced in CB:34510.
BUG=b:139101213
TEST=make clean && make test-abuild
BRANCH=none
Change-Id: Ifdea1d85167a50a1ada5afe9b107408e3a2e0d6f
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34790
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: caveh jalali <caveh@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security')
-rw-r--r-- | src/security/vboot/vboot_logic.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c index c61d6bec33..7f00df5796 100644 --- a/src/security/vboot/vboot_logic.c +++ b/src/security/vboot/vboot_logic.c @@ -335,8 +335,7 @@ void verstage_main(void) * 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 (vboot_setup_tpm(&ctx) == TPM_SUCCESS) antirollback_read_space_firmware(&ctx); timestamp_add_now(TS_END_TPMINIT); |