From 09c713ce51870146bd67824de1111e96c1198541 Mon Sep 17 00:00:00 2001 From: Binhao Lin Date: Mon, 3 Apr 2017 14:09:33 -0700 Subject: msm8996-common: camera: HAL3: Return Error For Unsupported Stream Format Return error code -EINVAL instead of 0 when the stream format is unsupported Change-Id: If6aee12c68054243a90d655bbaf0e95c36887682 --- camera/QCamera2/HAL3/QCamera3HWI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'camera/QCamera2/HAL3/QCamera3HWI.cpp') diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp index 14d15a5..4e785f6 100644 --- a/camera/QCamera2/HAL3/QCamera3HWI.cpp +++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp @@ -2111,7 +2111,8 @@ int QCamera3HardwareInterface::configureStreamsPerfLocked( default: LOGE("not a supported format 0x%x", newStream->format); - break; + pthread_mutex_unlock(&mMutex); + return -EINVAL; } } else if (newStream->stream_type == CAMERA3_STREAM_INPUT) { newStream->max_buffers = MAX_INFLIGHT_REPROCESS_REQUESTS; -- cgit v1.2.3