From 3f45c62de230ed678214b5b9271e788e4d766aea Mon Sep 17 00:00:00 2001 From: "Lian.chen" Date: Thu, 30 Jun 2022 17:00:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=9B=B8=E6=9C=BA?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=AF=B9=E5=BA=94=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81(HDF=5FFAILURE)=EF=BC=8C=E8=80=8C=E4=B8=8D=E6=98=AFHDF?= =?UTF-8?q?=5FSUCCESS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lian.chen --- .../hdi_ipc/server/host/dcamera_host_stub.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp index e7566368..ba7e633f 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp @@ -110,13 +110,17 @@ int32_t DCameraHostStub::DCHostStubGetCameraAbility(MessageParcel &data, Message return HDF_FAILURE; } - if (ret == CamRetCode::NO_ERROR) { - bool bRet = Camera::MetadataUtils::EncodeCameraMetadata(ability, reply); - if (!bRet) { - DHLOGE("Write ability failed."); - return HDF_FAILURE; - } + if (ret != CamRetCode::NO_ERROR) { + DHLOGE("Getting camera ability failed."); + return HDF_FAILURE; } + + bool bRet = Camera::MetadataUtils::EncodeCameraMetadata(ability, reply); + if (!bRet) { + DHLOGE("Write ability failed."); + return HDF_FAILURE; + } + return HDF_SUCCESS; } -- Gitee