From: Nayna Jain Subject: [PATCH] tpm: fix TPM error handling in tpm2_get_pcr_allocation Date: Thu, 26 Jan 2017 12:57:10 -0500 Message-ID: <1485453430-23561-1-git-send-email-nayna@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net Fixes: 75768b4(tpm: enhance TPM 2.0 PCR extend to support multiple banks) Signed-off-by: Nayna Jain --- drivers/char/tpm/tpm2-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index 4aad84c..fa52309 100644 --- a/drivers/char/tpm/tpm2-cmd.c +++ b/drivers/char/tpm/tpm2-cmd.c @@ -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( -- 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