summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-01-31 15:52:36 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-02-01 17:51:42 +0000
commit3d945890d8d22fa2669b6777c572bbe42152453e (patch)
tree09675acce011dcb96f43409cce0068488ddf25b3 /src/soc/amd/common/block
parent2a542da89fcfb8bb0d021ce65c67bf68a00fdcc7 (diff)
drivers/i2c/designware/dw_i2c: return enum cb_err from dw_i2c_init
Using enum cb_err as return type instead of int improves the readability of the code. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I55e6d93ca141b687871ceaa763bbbbe966c4b4a3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61511 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/i2c/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c
index a70645c293..733ad88132 100644
--- a/src/soc/amd/common/block/i2c/i2c.c
+++ b/src/soc/amd/common/block/i2c/i2c.c
@@ -96,7 +96,7 @@ 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) != CB_SUCCESS) {
printk(BIOS_ERR, "Failed to init i2c bus %u\n", bus);
continue;
}