Skip to contentSkip to conversation

tpm: fix TPM error handling in tpm2_get_pcr_allocation

PATCH New Nayna Jain 1 participant 1 message Jan 26, 2017 TPM device driver

lore
Share & tools
lore

Nayna Jain

author
#0 lore raw

PATCH 1/1 tpm: fix TPM error handling in tpm2_get_pcr_allocation

Fixes 75768b4(tpm: enhance TPM 2.0 PCR extend to support

multiple banks)

---
 drivers/char/tpm/tpm2-cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm2-cmd.c +1 -1
index 4aad84c..fa52309 100644
@@ -1022,7 +1022,7 @@ static ssize_t tpm2_get_pcr_allocation(struct tpm_chip *chip)
 
 	rc = tpm_transmit_cmd(chip, buf.data, PAGE_SIZE, 9, 0,
 			      "get tpm pcr allocation");
-	if (rc < 0)
+	if (rc)
 		goto out;
 
 	count = be32_to_cpup(
Signature · 6 lines
2.5.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot