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>
This commit is contained in:
parent
b9a47058eb
commit
12053cf8e6
6 changed files with 13 additions and 20 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue