diff options
author | Jerry Snitselaar <jsnitsel@redhat.com> | 2019-01-29 11:59:11 -0700 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2019-02-13 09:47:01 +0200 |
commit | 08a8112ad9c17ec3d78363bf7123df6598f09bc2 (patch) | |
tree | aa64d5eddb2fce67add2aa8800545ba6fb216191 /drivers | |
parent | c8faabfc6f48009fb0d9ad4203aecfa569e5ff8d (diff) | |
download | linux-08a8112ad9c17ec3d78363bf7123df6598f09bc2.tar.gz linux-08a8112ad9c17ec3d78363bf7123df6598f09bc2.tar.bz2 linux-08a8112ad9c17ec3d78363bf7123df6598f09bc2.zip |
tpm: don't print error message in tpm_transmit_cmd when tpm still testing
Currently tpm_transmit_cmd will print an error message if the tpm
returns something other than TPM2_RC_SUCCESS. This means that if the
tpm returns that it is testing an error message will be printed, and
this can cause confusion for the end user. So avoid printing the error
message if TPM2_RC_TESTING is the return code.
Cc: Peter Huewe <peterhuewe@gmx.de>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/tpm/tpm-interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index 88d2e01a651d..624075e767b8 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -406,7 +406,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space, err = be32_to_cpu(header->return_code); if (err != 0 && err != TPM_ERR_DISABLED && err != TPM_ERR_DEACTIVATED - && desc) + && err != TPM2_RC_TESTING && desc) dev_err(&chip->dev, "A TPM error (%d) occurred %s\n", err, desc); if (err) |