diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-03-25 02:07:23 +0100 |
---|---|---|
committer | Karthik Ramasubramanian <kramasub@google.com> | 2021-03-25 16:23:23 +0000 |
commit | a16a09f8693fbbab01714e001d57f1fcc53a1b42 (patch) | |
tree | c70820de29a9b018cce1272d24d6029b14109f9d /src/soc/amd | |
parent | 549abfb5abc63a4e2a51f52e61222bb816769f8b (diff) |
soc/amd/common/block/i2c: fix control flow bug
commit 4f87ae1d4a3a597f1260534001bd99160cc8ca99 introduced a regression
in the I2C initialization resulting in soc_i2c_misc_init never getting
called, since the continue statement was indented like it belonged to
the if above, but due to the missing curly braces it was outside the if
block.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Found-by: Coverity CID 1451395, 1451387
Change-Id: Id1f17ad59cba44e96881f5511df303ae90841ab3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51786
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/i2c/i2c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c index 95e25798d2..ec05e49204 100644 --- a/src/soc/amd/common/block/i2c/i2c.c +++ b/src/soc/amd/common/block/i2c/i2c.c @@ -100,9 +100,10 @@ static void dw_i2c_soc_init(bool is_early_init) cfg->early_init != is_early_init) continue; - if (dw_i2c_init(bus, cfg)) + if (dw_i2c_init(bus, cfg)) { printk(BIOS_ERR, "Failed to init i2c bus %d\n", bus); continue; + } soc_i2c_misc_init(bus, cfg); } |