|
@@ -546,8 +546,7 @@ int tpm_get_timeouts(struct tpm_chip *chip)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- rc = tpm_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap,
|
|
|
- "attempting to determine the timeouts");
|
|
|
+ rc = tpm_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, NULL);
|
|
|
if (rc == TPM_ERR_INVALID_POSTINIT) {
|
|
|
/* The TPM is not started, we are the first to talk to it.
|
|
|
Execute a startup command. */
|
|
@@ -558,8 +557,12 @@ int tpm_get_timeouts(struct tpm_chip *chip)
|
|
|
rc = tpm_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap,
|
|
|
"attempting to determine the timeouts");
|
|
|
}
|
|
|
- if (rc)
|
|
|
+ if (rc) {
|
|
|
+ dev_err(&chip->dev,
|
|
|
+ "A TPM error (%zd) occurred attempting to determine the timeouts\n",
|
|
|
+ rc);
|
|
|
return rc;
|
|
|
+ }
|
|
|
|
|
|
old_timeout[0] = be32_to_cpu(cap.timeout.a);
|
|
|
old_timeout[1] = be32_to_cpu(cap.timeout.b);
|