summaryrefslogtreecommitdiffstats
path: root/libstb
diff options
context:
space:
mode:
Diffstat (limited to 'libstb')
-rw-r--r--libstb/drivers/tpm_i2c_nuvoton.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c
index 28df2c78..e453b7c3 100644
--- a/libstb/drivers/tpm_i2c_nuvoton.c
+++ b/libstb/drivers/tpm_i2c_nuvoton.c
@@ -279,8 +279,17 @@ static int tpm_write_fifo(uint8_t* buf, size_t buflen)
count += bytes;
DBG("%s FIFO: %zd bytes written, count=%zd, rc=%d\n",
(rc) ? "!!!!" : "----", bytes, count, rc);
- if (rc < 0)
- return rc;
+ if (rc < 0) {
+ /**
+ * @fwts-label TPMWriteFifo
+ * @fwts-advice Either the tpm device or the tpm-i2c
+ * interface doesn't seem to be working properly. Check
+ * the return code (rc) for further details.
+ */
+ prlog(PR_ERR, "NUVOTON: fail to write fifo, "
+ "count=%zd, rc=%d\n", count, rc);
+ return STB_DRIVER_ERROR;
+ }
rc = tpm_wait_for_fifo_status(TPM_STS_VALID | TPM_STS_EXPECT,
TPM_STS_VALID | TPM_STS_EXPECT);
OpenPOWER on IntegriCloud