vboot TPM stub functions return error codes

TlclStubInit, TlclCloseDevice, and TlclOpenDevice were void functions but
should return error codes.

BUG=chromium-os:6695
TEST=RUNTESTS=1 make && emerge successfully

Review URL: http://codereview.chromium.org/5796005

Change-Id: I8ddbf8b1f080d98ff6ed42c4a675fbda5b17eef1
This commit is contained in:
Che-Liang Chiou
2010-12-16 14:11:17 +08:00
parent 9880ca5a03
commit 5d9509cbde
6 changed files with 27 additions and 20 deletions

View File

@@ -197,8 +197,7 @@ uint32_t SetupTPM(int recovery_mode, int developer_mode,
g_rollback_recovery_mode = 1; /* Global variables are usable in
* recovery mode */
/* TODO: TlclLibInit() should be able to return failure */
TlclLibInit();
RETURN_ON_FAILURE(TlclLibInit());
RETURN_ON_FAILURE(TlclStartup());
/* Use ContinueSelfTest rather than SelfTestFull(). It enables
@@ -336,7 +335,7 @@ uint32_t RollbackKernelLock(void) {
uint32_t RollbackS3Resume(void) {
uint32_t result;
TlclLibInit();
RETURN_ON_FAILURE(TlclLibInit());
result = TlclResume();
if (result == TPM_E_INVALID_POSTINIT) {
/* We're on a platform where the TPM maintains power in S3, so