summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/block/i2c/i2c.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c
index 625bb991d4..c6f3be2206 100644
--- a/src/soc/intel/common/block/i2c/i2c.c
+++ b/src/soc/intel/common/block/i2c/i2c.c
@@ -96,9 +96,12 @@ static void lpss_i2c_dev_init(struct device *dev)
const struct lpss_i2c_bus_config *config;
int bus = lpss_i2c_dev_to_bus(dev);
+ if (bus < 0)
+ return;
+
config = i2c_get_soc_cfg(bus, dev);
- if (!config || bus < 0)
+ if (!config)
return;
lpss_i2c_init(bus, config);
@@ -126,6 +129,9 @@ static void lpss_i2c_acpi_fill_ssdt(struct device *dev)
bus = lpss_i2c_dev_to_bus(dev);
+ if (bus < 0)
+ return;
+
bcfg = i2c_get_soc_cfg(bus, dev);
if (!bcfg)