Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull TPM bugfix from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  tpm: invalid self test error message
This commit is contained in:
Linus Torvalds 2016-09-02 15:33:54 -07:00
commit 0ddc9e5a11
1 changed files with 1 additions and 2 deletions

View File

@ -957,7 +957,7 @@ int tpm2_auto_startup(struct tpm_chip *chip)
goto out; goto out;
rc = tpm2_do_selftest(chip); 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"); dev_err(&chip->dev, "TPM self test failed\n");
goto out; goto out;
} }
@ -974,7 +974,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
} }
} }
return rc;
out: out:
if (rc > 0) if (rc > 0)
rc = -ENODEV; rc = -ENODEV;