summaryrefslogtreecommitdiff
path: root/src/security/tpm/tspi
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/tpm/tspi')
-rw-r--r--src/security/tpm/tspi/log.c12
-rw-r--r--src/security/tpm/tspi/tspi.c6
2 files changed, 7 insertions, 11 deletions
diff --git a/src/security/tpm/tspi/log.c b/src/security/tpm/tspi/log.c
index 6091dfe5b9..8ec4c6d49d 100644
--- a/src/security/tpm/tspi/log.c
+++ b/src/security/tpm/tspi/log.c
@@ -44,24 +44,24 @@ void tcpa_log_init(void)
printk(BIOS_DEBUG, "TCPA log created at %p\n", tclt);
}
-int tcpa_log_add_table_entry(const char *name, const uint32_t pcr,
- const uint8_t *digest, const size_t digest_length)
+void tcpa_log_add_table_entry(const char *name, const uint32_t pcr,
+ const uint8_t *digest, const size_t digest_length)
{
MAYBE_STATIC struct tcpa_table *tclt = NULL;
struct tcpa_entry *tce;
if (!cbmem_possibly_online())
- return -1;
+ return;
tclt = cbmem_find(CBMEM_ID_TCPA_LOG);
if (!tclt) {
printk(BIOS_ERR, "ERROR: No TCPA log table found\n");
- return -1;
+ return;
}
if (tclt->num_entries == tclt->max_entries) {
printk(BIOS_WARNING, "ERROR: TCPA log table is full\n");
- return -1;
+ return;
}
tce = &tclt->entries[tclt->num_entries++];
@@ -70,6 +70,4 @@ int tcpa_log_add_table_entry(const char *name, const uint32_t pcr,
tce->pcr = pcr;
memcpy(tce->digest, digest, digest_length);
tce->digest_length = digest_length;
-
- return 0;
}
diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c
index 48b6219547..950e930133 100644
--- a/src/security/tpm/tspi/tspi.c
+++ b/src/security/tpm/tspi/tspi.c
@@ -190,9 +190,7 @@ uint32_t tpm_extend_pcr(int pcr, uint8_t *digest,
if (result != TPM_SUCCESS)
return result;
- result = tcpa_log_add_table_entry(name, pcr, digest, digest_len);
- if (result != 0)
- printk(BIOS_ERR, "ERROR: Couldn't create TCPA log entry\n");
+ tcpa_log_add_table_entry(name, pcr, digest, digest_len);
- return 0;
+ return TPM_SUCCESS;
}