aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-09-01 19:36:58 -0400
committerJames Morris <james.l.morris@oracle.com>2016-09-02 18:27:37 -0400
commit4a29b3484f857ff350f203a2d9bf3b428c9e0bf2 (patch)
treef78f2ae46792d54a97b5328724499f1181aef429
parent15301a570754c7af60335d094dd2d1808b0641a5 (diff)
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> Signed-off-by: James Morris <james.l.morris@oracle.com>
-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)
957 goto out; 957 goto out;
958 958
959 rc = tpm2_do_selftest(chip); 959 rc = tpm2_do_selftest(chip);
960 if (rc != TPM2_RC_INITIALIZE) { 960 if (rc != 0 && rc != TPM2_RC_INITIALIZE) {
961 dev_err(&chip->dev, "TPM self test failed\n"); 961 dev_err(&chip->dev, "TPM self test failed\n");
962 goto out; 962 goto out;
963 } 963 }
@@ -974,7 +974,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
974 } 974 }
975 } 975 }
976 976
977 return rc;
978out: 977out:
979 if (rc > 0) 978 if (rc > 0)
980 rc = -ENODEV; 979 rc = -ENODEV;