diff options
Diffstat (limited to 'board/cr50/tpm2/tpm_mode.c')
-rw-r--r-- | board/cr50/tpm2/tpm_mode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/board/cr50/tpm2/tpm_mode.c b/board/cr50/tpm2/tpm_mode.c index 8282236caa..dea38abf02 100644 --- a/board/cr50/tpm2/tpm_mode.c +++ b/board/cr50/tpm2/tpm_mode.c @@ -22,7 +22,6 @@ static void disable_tpm(void) { - nvmem_enable_commits(); tpm_stop(); DCRYPTO_ladder_revoke(); nvmem_clear_cache(); @@ -72,6 +71,9 @@ static enum vendor_cmd_rc process_tpm_mode(struct vendor_cmd_params *p) * so that this vendor command can be responded to * before TPM stops. */ + if (nvmem_enable_commits() != EC_SUCCESS) + return VENDOR_RC_NVMEM_LOCKED; + hook_call_deferred(&disable_tpm_data, 10 * MSEC); break; default: |