Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -2
+1 -2
drivers/char/tpm/tpm2-cmd.c
··· 957 957 goto out; 958 958 959 959 rc = tpm2_do_selftest(chip); 960 - if (rc != TPM2_RC_INITIALIZE) { 960 + if (rc != 0 && rc != TPM2_RC_INITIALIZE) { 961 961 dev_err(&chip->dev, "TPM self test failed\n"); 962 962 goto out; 963 963 } ··· 974 974 } 975 975 } 976 976 977 - return rc; 978 977 out: 979 978 if (rc > 0) 980 979 rc = -ENODEV;