Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/27931
Change subject: security/tpm/tss/tcg-2.0/tss_marshaling.c: Avoid static analysis error ......................................................................
security/tpm/tss/tcg-2.0/tss_marshaling.c: Avoid static analysis error
In procedure tpm_unmarshal_response(), variable "rc" is used early to decide if it should return NULL. However, from that point on, the variable is only |=, but not read. Thus it's causing a static analysis error. Add a printk line using variable "rc" to avoid static analysis error.
BUG=b:112253891 TEST=Build and boot grunt.
Change-Id: I7575bc75104fd97f138224aa57561e68f6548e58 Signed-off-by: Richard Spiegel richard.spiegel@silverbackltd.com --- M src/security/tpm/tss/tcg-2.0/tss_marshaling.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/27931/1
diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c index 86f2231..bd46a7c 100644 --- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c +++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c @@ -554,6 +554,9 @@ command, ibuf_remaining(ib)); return NULL; } + if (rc) + printk(BIOS_INFO, "Final tpm_unmarshal_response status 0x%x\n", + rc);
/* The entire message have been parsed. */ return tpm2_resp;