summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-06-09 13:15:25 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-06-21 08:32:32 +0000
commit1ba0da17c831eb0b02b863d3a5e2df993a3962aa (patch)
treee07d45669056c70e5f7da045a53dca2a117be0a4 /src
parentb53427156c8ccaa33b92a1cb73200cae11de7e58 (diff)
downloadcoreboot-1ba0da17c831eb0b02b863d3a5e2df993a3962aa.tar.xz
ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'. Change-Id: I0843bebe48e4b91fc76c440ae33bbca838621de9 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33334 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Vlado Cibic Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/ec/kontron/kempld/kempld_i2c.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ec/kontron/kempld/kempld_i2c.c b/src/ec/kontron/kempld/kempld_i2c.c
index fdc0b50dfc..ab41097782 100644
--- a/src/ec/kontron/kempld/kempld_i2c.c
+++ b/src/ec/kontron/kempld/kempld_i2c.c
@@ -166,10 +166,9 @@ static int kempld_i2c_process(struct kempld_i2c_data *const i2c)
if (!(msg->flags & I2C_M_NOSTART)) {
i2c->state = STATE_ADDR;
return 0;
- } else {
- i2c->state = (msg->flags & I2C_M_RD)
- ? STATE_READ : STATE_WRITE;
}
+ i2c->state = (msg->flags & I2C_M_RD)
+ ? STATE_READ : STATE_WRITE;
} else {
i2c->state = STATE_DONE;
kempld_write8(KEMPLD_I2C_CMD, I2C_CMD_STOP);