OSDN Git Service

Camera: Don't overwrite the error status
authorZhijun He <zhijunhe@google.com>
Sat, 14 Sep 2013 00:59:59 +0000 (17:59 -0700)
committerZhijun He <zhijunhe@google.com>
Sun, 15 Sep 2013 18:19:17 +0000 (11:19 -0700)
Bug: 10749544
Change-Id: I6096effde03e18ee1b8c63cf3b36dce0344054c5

services/camera/libcameraservice/common/Camera2ClientBase.cpp

index 060e2a2..e808bf3 100644 (file)
@@ -95,7 +95,7 @@ status_t Camera2ClientBase<TClientBase>::initialize(camera_module_t *module) {
     if (res != OK) {
         ALOGE("%s: Camera %d: unable to initialize device: %s (%d)",
                 __FUNCTION__, TClientBase::mCameraId, strerror(-res), res);
-        return NO_INIT;
+        return res;
     }
 
     res = mDevice->setNotifyCallback(this);