summaryrefslogtreecommitdiff
path: root/src/android/camera3_hal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera3_hal.cpp')
-rw-r--r--src/android/camera3_hal.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
index d6e04af2..08773d33 100644
--- a/src/android/camera3_hal.cpp
+++ b/src/android/camera3_hal.cpp
@@ -77,11 +77,11 @@ static int hal_dev_open(const hw_module_t *module, const char *name,
LOG(HAL, Debug) << "Open camera " << name;
int id = atoi(name);
- CameraDevice *camera = cameraManager.open(id, module);
+ auto [camera, ret] = cameraManager.open(id, module);
if (!camera) {
LOG(HAL, Error)
<< "Failed to open camera module '" << id << "'";
- return -ENODEV;
+ return ret == -EBUSY ? -EUSERS : ret;
}
*device = &camera->camera3Device()->common;