aboutsummaryrefslogtreecommitdiff
path: root/src/device/device_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r--src/device/device_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 5e353c2734..7dcf081820 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -252,9 +252,9 @@ const struct device *dev_get_domain(const struct device *dev)
{
/* Walk up the tree up to the domain */
while (dev && dev->upstream && !is_root_device(dev)) {
- dev = dev->upstream->dev;
if (dev->path.type == DEVICE_PATH_DOMAIN)
return dev;
+ dev = dev->upstream->dev;
}
return NULL;