summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/device_enumerator_udev.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index e0c646c9..210f5c1f 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -180,10 +180,10 @@ int DeviceEnumeratorUdev::populateMediaDevice(const std::shared_ptr<MediaDevice>
dev_t devnum = makedev(entity->deviceMajor(),
entity->deviceMinor());
- std::string deviceNode = lookupDeviceNode(devnum);
/* Take device from orphan list first, if it is in the list. */
if (std::find(orphans_.begin(), orphans_.end(), devnum) != orphans_.end()) {
+ std::string deviceNode = lookupDeviceNode(devnum);
if (deviceNode.empty())
return -EINVAL;