Message ID | 1472795790-15131-1-git-send-email-jarkko.sakkinen@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 2 Sep 2016, Jarkko Sakkinen wrote: > The driver emits invalid self test error message even though the init > succeeds. > > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: James Morris <james.l.morris@oracle.com>
On Fri, Sep 02, 2016 at 08:56:29AM +0300, Jarkko Sakkinen wrote: > 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: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reported-by: Petr Vandrovec <petr@vmware.com> Jason -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index 955fd26..906c285 100644 --- a/drivers/char/tpm/tpm2-cmd.c +++ b/drivers/char/tpm/tpm2-cmd.c @@ -966,7 +966,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; } @@ -983,7 +983,6 @@ int tpm2_auto_startup(struct tpm_chip *chip) } } - return rc; out: if (rc > 0) rc = -ENODEV;
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") --- drivers/char/tpm/tpm2-cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)