summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/tpm_registers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/tpm_registers.c b/common/tpm_registers.c
index 7447ef3191..823f9c7513 100644
--- a/common/tpm_registers.c
+++ b/common/tpm_registers.c
@@ -903,7 +903,9 @@ int tpm_sync_reset(int wipe_first)
void tpm_stop(void)
{
- if_stop();
+ /* Stop the TPM interface if it has been initialized. */
+ if (if_stop)
+ if_stop();
}
void tpm_task(void *u)