summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/siemens/mc_bdx1/mainboard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mainboard/siemens/mc_bdx1/mainboard.c b/src/mainboard/siemens/mc_bdx1/mainboard.c
index ebc6d40fdc..66edcb7a66 100644
--- a/src/mainboard/siemens/mc_bdx1/mainboard.c
+++ b/src/mainboard/siemens/mc_bdx1/mainboard.c
@@ -259,11 +259,11 @@ static void wait_for_legacy_dev(void *unused)
struct device *pca9538_get_dev(void)
{
struct device *dev = NULL;
- do {
- dev = dev_find_path(dev, DEVICE_PATH_I2C);
+
+ while ((dev = dev_find_path(dev, DEVICE_PATH_I2C))) {
if (dev->path.i2c.device == PCA9538_SLAVE_ADR)
break;
- } while (dev);
+ }
return dev;
}