Skip to content

Commit

Permalink
tpm: invalid self test error message
Browse files Browse the repository at this point in the history
The driver emits invalid self test error message even though the init
succeeds.

Signed-off-by: Jarkko Sakkinen <[email protected]>
Fixes: cae8b44 ("tpm: Factor out common startup code")
Reviewed-by: James Morris <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Jarkko Sakkinen authored and James Morris committed Sep 2, 2016
1 parent 15301a5 commit 4a29b34
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 4a29b34

Please sign in to comment.