summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Cagle <d-cagle@codeaurora.org>2017-08-10 18:12:58 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-08-10 18:12:58 +0000
commit7357ccc86c1fd0748faf35b8d3745d6981e5d276 (patch)
treebf659e3a79da0f59f67084847dd1aebe3526bfea
parenta5c08d4b158b9c3a4546686fc157213dac617172 (diff)
parente3620d0413f050f84012ff1ff5c14a8455c2b58e (diff)
downloadangler-7357ccc86c1fd0748faf35b8d3745d6981e5d276.tar.gz
QCamera2/HAL3: correct mutex lock/unlock sequence
am: e3620d0413 Change-Id: Id41fd64604b8386f6447df4071620b2d04fc38f6
-rw-r--r--camera/QCamera2/HAL3/QCamera3HWI.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index f94d211..5f9f974 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -1892,6 +1892,7 @@ int QCamera3HardwareInterface::configureStreamsPerfLocked(
newStream->max_buffers = MAX_INFLIGHT_REPROCESS_REQUESTS;
} else {
ALOGE("%s: Error, Unknown stream type", __func__);
+ pthread_mutex_unlock(&mMutex);
return -EINVAL;
}
@@ -3701,6 +3702,7 @@ no_error:
if(ADD_SET_PARAM_ENTRY_TO_BATCH(mParameters,
CAM_INTF_META_FRAME_NUMBER, request->frame_number)) {
ALOGE("%s: Failed to set the frame number in the parameters", __func__);
+ pthread_mutex_unlock(&mMutex);
return BAD_VALUE;
}
}