<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27931">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">security/tpm/tss/tcg-2.0/tss_marshaling.c: Avoid static analysis error<br><br>In procedure tpm_unmarshal_response(), variable "rc" is used early to<br>decide if it should return NULL. However, from that point on, the variable<br>is only |=, but not read. Thus it's causing a static analysis error. Add a<br>printk line using variable "rc" to avoid static analysis error.<br><br>BUG=b:112253891<br>TEST=Build and boot grunt.<br><br>Change-Id: I7575bc75104fd97f138224aa57561e68f6548e58<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/security/tpm/tss/tcg-2.0/tss_marshaling.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/27931/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c</span><br><span>index 86f2231..bd46a7c 100644</span><br><span>--- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c</span><br><span>+++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c</span><br><span>@@ -554,6 +554,9 @@</span><br><span>                     command, ibuf_remaining(ib));</span><br><span>                 return NULL;</span><br><span>         }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (rc)</span><br><span style="color: hsl(120, 100%, 40%);">+               printk(BIOS_INFO, "Final tpm_unmarshal_response status 0x%x\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                             rc);</span><br><span> </span><br><span>     /* The entire message have been parsed. */</span><br><span>   return tpm2_resp;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27931">change 27931</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27931"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I7575bc75104fd97f138224aa57561e68f6548e58 </div>
<div style="display:none"> Gerrit-Change-Number: 27931 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>