Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a29b348 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by James Morris
Browse files

tpm: invalid self test error message



The driver emits invalid self test error message even though the init
succeeds.

Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fixes: cae8b441 ("tpm: Factor out common startup code")
Reviewed-by: default avatarJames Morris <james.l.morris@oracle.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent 15301a57
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -957,7 +957,7 @@ int tpm2_auto_startup(struct tpm_chip *chip)
		goto out;
		goto out;


	rc = tpm2_do_selftest(chip);
	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");
		dev_err(&chip->dev, "TPM self test failed\n");
		goto out;
		goto out;
	}
	}
@@ -974,7 +974,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
		}
		}
	}
	}


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