diff options
Diffstat (limited to 'src/security/tpm/tspi/tspi.c')
-rw-r--r-- | src/security/tpm/tspi/tspi.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c index fccf224519..c1779e677a 100644 --- a/src/security/tpm/tspi/tspi.c +++ b/src/security/tpm/tspi/tspi.c @@ -97,10 +97,25 @@ uint32_t tpm_setup(int s3flag) /* Handle special init for S3 resume path */ if (s3flag) { result = tlcl_resume(); - if (result == TPM_E_INVALID_POSTINIT) + switch (result) { + case TPM_SUCCESS: + break; + + case TPM_E_INVALID_POSTINIT: + /* + * We're on a platform where the TPM maintains power + * in S3, so it's already initialized. + */ printk(BIOS_INFO, "TPM: Already initialized.\n"); + result = TPM_SUCCESS; + break; - return TPM_SUCCESS; + default: + printk(BIOS_ERR, "TPM: Resume failed (%#x).\n", result); + break; + + } + goto out; } result = tlcl_startup(); |