Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474899 > unrolled thread

[PATCH] tpm: invalid self test error message

Started byJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
First post2016-09-02 08:00 +0200
Last post2016-09-02 19:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] tpm: invalid self test error message Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-02 08:00 +0200
    Re: [PATCH] tpm: invalid self test error message James Morris <jmorris@namei.org> - 2016-09-02 09:00 +0200
    Re: [PATCH] tpm: invalid self test error message Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-02 19:10 +0200

#1474899 — [PATCH] tpm: invalid self test error message

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-09-02 08:00 +0200
Subject[PATCH] tpm: invalid self test error message
Message-ID<scPG9-3Qv-7@gated-at.bofh.it>
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(-)

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;
-- 
2.7.4

[toc] | [next] | [standalone]


#1474918

FromJames Morris <jmorris@namei.org>
Date2016-09-02 09:00 +0200
Message-ID<scQCd-4td-1@gated-at.bofh.it>
In reply to#1474899
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>


-- 
James Morris
<jmorris@namei.org>

[toc] | [prev] | [next] | [standalone]


#1475354

FromJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date2016-09-02 19:10 +0200
Message-ID<sd08x-2fg-15@gated-at.bofh.it>
In reply to#1474899
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web