summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorJarkko Sakkinen2016-09-02 01:36:58 +0200
committerJarkko Sakkinen2016-09-15 15:04:21 +0200
commitb7d7b28471072fc23e7b573aef89c14438092223 (patch)
tree0359defb936618b5f1841763c66d714fb9aed593 /drivers/char/tpm
parentMerge branch 'smack-for-4.9' of http://github.com/cschaufler/smack-next into ... (diff)
downloadkernel-qcow2-linux-b7d7b28471072fc23e7b573aef89c14438092223.tar.gz
kernel-qcow2-linux-b7d7b28471072fc23e7b573aef89c14438092223.tar.xz
kernel-qcow2-linux-b7d7b28471072fc23e7b573aef89c14438092223.zip
tpm: invalid self test error message
The driver emits invalid self test error message even though the init succeeds. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Fixes: cae8b441fc20 ("tpm: Factor out common startup code") Reviewed-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm2-cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 08c7e23ed535..0c75c3f1689f 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -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;