<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/29152">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd/stoneyridge: Remove "else" after a return<br><br>File smbus_spd.c has 2 instances of if()/else where the if tests for an<br>error condition and returns just before the "else" statement. These "else"<br>statements are not needed.<br><br>BUG=b:117648025<br>TEST=Build and boot grunt.<br><br>Change-Id: Ie8298773ae455dbb1125420ec65df24f3c65eb44<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/soc/amd/stoneyridge/smbus_spd.c<br>1 file changed, 4 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/29152/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/amd/stoneyridge/smbus_spd.c b/src/soc/amd/stoneyridge/smbus_spd.c</span><br><span>index 6027400..384bc8a 100644</span><br><span>--- a/src/soc/amd/stoneyridge/smbus_spd.c</span><br><span>+++ b/src/soc/amd/stoneyridge/smbus_spd.c</span><br><span>@@ -50,10 +50,9 @@</span><br><span>       if (error < 0) {</span><br><span>          printk(BIOS_ERR, "-------------SPD READ ERROR-----------\n");</span><br><span>              return error;</span><br><span style="color: hsl(0, 100%, 40%);">-   } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                *pbuf = (char) error;</span><br><span style="color: hsl(0, 100%, 40%);">-           pbuf++;</span><br><span>      }</span><br><span style="color: hsl(120, 100%, 40%);">+     *pbuf = (char) error;</span><br><span style="color: hsl(120, 100%, 40%);">+ pbuf++;</span><br><span> </span><br><span>  /* Read the remaining SPD bytes using do_smbus_recv_byte for speed */</span><br><span>        for (index = 1 ; index < count ; index++) {</span><br><span>@@ -61,10 +60,9 @@</span><br><span>          if (error < 0) {</span><br><span>                  printk(BIOS_ERR, "-------------SPD READ ERROR-----------\n");</span><br><span>                      return error;</span><br><span style="color: hsl(0, 100%, 40%);">-           } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                        *pbuf = (char) error;</span><br><span style="color: hsl(0, 100%, 40%);">-                   pbuf++;</span><br><span>              }</span><br><span style="color: hsl(120, 100%, 40%);">+             *pbuf = (char) error;</span><br><span style="color: hsl(120, 100%, 40%);">+         pbuf++;</span><br><span>      }</span><br><span>    printk(BIOS_SPEW, "\n");</span><br><span>   printk(BIOS_SPEW, "-------------FINISHED READING SPD-----------\n");</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/29152">change 29152</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/29152"/><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: Ie8298773ae455dbb1125420ec65df24f3c65eb44 </div>
<div style="display:none"> Gerrit-Change-Number: 29152 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>