summaryrefslogtreecommitdiff
path: root/test/media_device
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-04-14 00:28:53 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-05-17 01:33:12 +0200
commit12053cf8e6a98104b6c765e1ac8a34b8f7a02eed (patch)
treee9e45417a200c28e34ac23f53a8daa01591b495b /test/media_device
parentb9a47058eb46281dd0c365b9e18a323994791498 (diff)
libcamera: Always check return value of MediaDevice::acquire()
In preparation for adding more responsibility to MediaDevice::acquire() remove unneeded calls to acquire() and release(), and make sure all needed calls to acquire() are checked and acted on. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/media_device')
-rw-r--r--test/media_device/media_device_link_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/media_device/media_device_link_test.cpp b/test/media_device/media_device_link_test.cpp
index 58a55cdf..484d3691 100644
--- a/test/media_device/media_device_link_test.cpp
+++ b/test/media_device/media_device_link_test.cpp
@@ -51,7 +51,11 @@ class MediaDeviceLinkTest : public Test
return TestSkip;
}
- dev_->acquire();
+ if (!dev_->acquire()) {
+ cerr << "Unable to acquire media device "
+ << dev_->deviceNode() << endl;
+ return TestSkip;
+ }
if (dev_->open()) {
cerr << "Failed to open media device at "