summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>2018-10-16 13:44:03 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-10-18 12:46:34 +0000
commitd46bb6bdf0ad2be0bbd5d01a7248785e6da11014 (patch)
treebdd6d042142af15c4596e5ec7a18cb1cd13465ca /src/soc/amd/stoneyridge
parent585210ad587675067d59e8f408be4d2f5a860acf (diff)
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@silverbackltd.com> Reviewed-on: https://review.coreboot.org/29152 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r--src/soc/amd/stoneyridge/smbus_spd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/soc/amd/stoneyridge/smbus_spd.c b/src/soc/amd/stoneyridge/smbus_spd.c
index 60274005ba..384bc8a391 100644
--- a/src/soc/amd/stoneyridge/smbus_spd.c
+++ b/src/soc/amd/stoneyridge/smbus_spd.c
@@ -50,10 +50,9 @@ static int readspd(uint16_t iobase, uint8_t SmbusSlaveAddress,
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 @@ static int readspd(uint16_t iobase, uint8_t SmbusSlaveAddress,
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");