summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/device/i2c_bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/i2c_bus.c b/src/device/i2c_bus.c
index c355506f72..df36404660 100644
--- a/src/device/i2c_bus.c
+++ b/src/device/i2c_bus.c
@@ -25,7 +25,7 @@ struct bus *i2c_link(const struct device *const dev)
(parent->ops->ops_i2c_bus || parent->ops->ops_smbus_bus))
break;
- if (parent && parent->bus)
+ if (parent && parent->bus && link != parent->bus)
link = parent->bus;
else
link = NULL;