soc/amd/common/block/i2c: fix control flow bug
commit 4f87ae1d4a
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>
This commit is contained in:
parent
549abfb5ab
commit
a16a09f869
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue