summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/i2c
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/intel/common/block/i2c
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/intel/common/block/i2c')
-rw-r--r--src/soc/intel/common/block/i2c/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c
index acc23abb0c..7fdf8187ff 100644
--- a/src/soc/intel/common/block/i2c/i2c.c
+++ b/src/soc/intel/common/block/i2c/i2c.c
@@ -72,7 +72,7 @@ static int lpss_i2c_early_init_bus(unsigned int bus)
lpss_set_power_state(dev, STATE_D0);
/* Initialize the controller */
- if (dw_i2c_init(bus, config) < 0) {
+ if (dw_i2c_init(bus, config) != CB_SUCCESS) {
printk(BIOS_ERR, "I2C%u failed to initialize\n", bus);
return -1;
}