Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Sep 2, 2016
2 parents 601b586 + 4a29b34 commit 0ddc9e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/tpm/tpm2-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -974,7 +974,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
}
}

return rc;
out:
if (rc > 0)
rc = -ENODEV;
Expand Down

0 comments on commit 0ddc9e5

Please sign in to comment.