Skip to contentSkip to conversation

TPM bugfix

GIT PULL James Morris 1 participant 1 message Sep 2, 2016 TPM device driver

lore
Share & tools
lore
#0 lore raw

Please pull this fix for the TPM code.

The following changes since commit 15301a570754c7af60335d094dd2d1808b0641a5:

x86/paravirt: Do not trace _paravirt_ident_*() functions (2016-09-02 09:40:47 -0700)

are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git for-linus

Jarkko Sakkinen (1):
tpm: invalid self test error message

 drivers/char/tpm/tpm2-cmd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

---

commit 85bd4528b88838a26b078ee3895c3cf3ad95b03c

Author: Jarkko Sakkinen <[email protected]>
Date:   Fri Sep 2 02:36:58 2016 +0300

tpm: invalid self test error message

The driver emits invalid self test error message even though the init succeeds.

Fixes cae8b441fc20 ("tpm: Factor out common startup code")
drivers/char/tpm/tpm2-cmd.c +1 -2
index 08c7e23..0c75c3f 100644
@@ -957,7 +957,7 @@ int tpm2_auto_startup(struct tpm_chip *chip)
 		goto out;
 
 	rc = tpm2_do_selftest(chip);
-	if (rc != TPM2_RC_INITIALIZE) {
+	if (rc != 0 && rc != TPM2_RC_INITIALIZE) {
 		dev_err(&chip->dev, "TPM self test failed\n");
 		goto out;
 	}
@@ -974,7 +974,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
 		}
 	}
 
-	return rc;
 out:
 	if (rc > 0)
 		rc = -ENODEV;