[coreboot-gerrit] Change in coreboot[master]: soc/amd/stoneyridge: Remove "else" after a return
Richard Spiegel (Code Review)
gerrit at coreboot.org
Tue Oct 16 22:53:32 CEST 2018
Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/29152
Change subject: soc/amd/stoneyridge: Remove "else" after a return
......................................................................
soc/amd/stoneyridge: Remove "else" after a return
File smbus_spd.c has 2 instances of if()/else where the if tests for an
error condition and returns just before the "else" statement. These "else"
statements are not needed.
BUG=b:117648025
TEST=Build and boot grunt.
Change-Id: Ie8298773ae455dbb1125420ec65df24f3c65eb44
Signed-off-by: Richard Spiegel <richard.spiegel at silverbackltd.com>
---
M src/soc/amd/stoneyridge/smbus_spd.c
1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/29152/1
diff --git a/src/soc/amd/stoneyridge/smbus_spd.c b/src/soc/amd/stoneyridge/smbus_spd.c
index 6027400..384bc8a 100644
--- a/src/soc/amd/stoneyridge/smbus_spd.c
+++ b/src/soc/amd/stoneyridge/smbus_spd.c
@@ -50,10 +50,9 @@
if (error < 0) {
printk(BIOS_ERR, "-------------SPD READ ERROR-----------\n");
return error;
- } else {
- *pbuf = (char) error;
- pbuf++;
}
+ *pbuf = (char) error;
+ pbuf++;
/* Read the remaining SPD bytes using do_smbus_recv_byte for speed */
for (index = 1 ; index < count ; index++) {
@@ -61,10 +60,9 @@
if (error < 0) {
printk(BIOS_ERR, "-------------SPD READ ERROR-----------\n");
return error;
- } else {
- *pbuf = (char) error;
- pbuf++;
}
+ *pbuf = (char) error;
+ pbuf++;
}
printk(BIOS_SPEW, "\n");
printk(BIOS_SPEW, "-------------FINISHED READING SPD-----------\n");
--
To view, visit https://review.coreboot.org/29152
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8298773ae455dbb1125420ec65df24f3c65eb44
Gerrit-Change-Number: 29152
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181016/70ba80ac/attachment.html>
More information about the coreboot-gerrit
mailing list