vendorcode/google: Add error handling
Coverity detects missing error handling after calling function tlcl_lib_init. This change checks the function tlcl_lib_init return value and handles error properly. Found-by: Coverity CID 1431994 TEST=None Signed-off-by: John Zhao <john.zhao@intel.com> Change-Id: Ib831646b6a231ad57e3bfef85b801b592d572e6a Reviewed-on: https://review.coreboot.org/c/coreboot/+/44777 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Caveh Jalali <caveh@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
66b0c5e884
commit
f90e3b9975
|
@ -9,14 +9,22 @@
|
|||
#include <halt.h>
|
||||
#include <intelblocks/cse.h>
|
||||
#include <security/tpm/tss.h>
|
||||
#include <vb2_api.h>
|
||||
|
||||
void cse_board_reset(void)
|
||||
{
|
||||
int ret;
|
||||
struct cr50_firmware_version version;
|
||||
|
||||
/* Initialize TPM and get the cr50 firmware version. */
|
||||
tlcl_lib_init();
|
||||
ret = tlcl_lib_init();
|
||||
if (ret != VB2_SUCCESS) {
|
||||
printk(BIOS_ERR, "tlcl_lib_init() failed: 0x%x\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
cr50_get_firmware_version(&version);
|
||||
|
||||
/*
|
||||
* Cr50 firmware versions 0.[3|4].20 or newer support strap config 0xe where PLTRST from
|
||||
* AP is connected to cr50's PLTRST# signal. So return immediately and trigger a
|
||||
|
|
Loading…
Reference in New Issue