summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-20 00:30:51 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-20 11:58:29 +0300
commit058407bb9ba4e122f464b3515f30ae1205ff803d (patch)
tree5b27cfeb2cb5492d00cd4dab3b1ecca5cc89c600
parent35269f04578082675778ef7ce6eab2fb4d559d9a (diff)
libcamera: device_enumerator_udev: Log the right number of missing deps
Since commit e75ef59e028e ("libcamera: device_enumerator_udev: Update pending list in addUdevDevice") the populateMediaDevice() function returns 0 on success instead of the number of missing dependencies, resulting in a wrong number being logged. Fix it. Fixes: e75ef59e028e ("libcamera: device_enumerator_udev: Update pending list in addUdevDevice") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <email@uajain.com>
-rw-r--r--src/libcamera/device_enumerator_udev.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index 9cbc7e47..2e33c898 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -94,7 +94,8 @@ int DeviceEnumeratorUdev::addUdevDevice(struct udev_device *dev)
if (!deps.empty()) {
LOG(DeviceEnumerator, Debug)
<< "Defer media device " << media->deviceNode()
- << " due to " << ret << " missing dependencies";
+ << " due to " << deps.size()
+ << " missing dependencies";
pending_.emplace_back(std::move(media), std::move(deps));
MediaDeviceDeps *mediaDeps = &pending_.back();