summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp10
-rw-r--r--src/libcamera/pipeline/uvcvideo.cpp3
-rw-r--r--src/libcamera/pipeline/vimc.cpp3
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 00416625..75e878af 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -614,21 +614,19 @@ bool PipelineHandlerIPU3::match(DeviceEnumerator *enumerator)
imgu_dm.add("ipu3-imgu 1 viewfinder");
imgu_dm.add("ipu3-imgu 1 3a stat");
- /*
- * It is safe to acquire both media devices at this point as
- * DeviceEnumerator::search() skips the busy ones for us.
- */
cio2MediaDev_ = enumerator->search(cio2_dm);
if (!cio2MediaDev_)
return false;
- cio2MediaDev_->acquire();
+ if (!cio2MediaDev_->acquire())
+ return false;
imguMediaDev_ = enumerator->search(imgu_dm);
if (!imguMediaDev_)
return false;
- imguMediaDev_->acquire();
+ if (!imguMediaDev_->acquire())
+ return false;
/*
* Disable all links that are enabled by default on CIO2, as camera
diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
index 5d2f1c98..e40b052f 100644
--- a/src/libcamera/pipeline/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo.cpp
@@ -183,7 +183,8 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)
if (!media_)
return false;
- media_->acquire();
+ if (!media_->acquire())
+ return false;
std::unique_ptr<UVCCameraData> data = utils::make_unique<UVCCameraData>(this);
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index cdf43770..7b6ebd4c 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -193,7 +193,8 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
if (!media_)
return false;
- media_->acquire();
+ if (!media_->acquire())
+ return false;
std::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);