Skip to content

Commit 08a8112

Browse files
snitsJarkko Sakkinen
authored andcommitted
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>
1 parent c8faabf commit 08a8112

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/tpm/tpm-interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space,
406406

407407
err = be32_to_cpu(header->return_code);
408408
if (err != 0 && err != TPM_ERR_DISABLED && err != TPM_ERR_DEACTIVATED
409-
&& desc)
409+
&& err != TPM2_RC_TESTING && desc)
410410
dev_err(&chip->dev, "A TPM error (%d) occurred %s\n", err,
411411
desc);
412412
if (err)

0 commit comments

Comments
 (0)