From 9be4fc42dfcdc0f9394be58bf9454987d3814fe2 Mon Sep 17 00:00:00 2001 From: xiongchangwu Date: Tue, 12 Nov 2024 23:04:59 +0800 Subject: [PATCH] =?UTF-8?q?lock=20ioService=20=EF=BC=88cherry=20picked=20c?= =?UTF-8?q?ommit=20from=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pingliao --- adapter/uhdf2/host/src/device_service_stub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adapter/uhdf2/host/src/device_service_stub.c b/adapter/uhdf2/host/src/device_service_stub.c index 51419c660..17f929c54 100644 --- a/adapter/uhdf2/host/src/device_service_stub.c +++ b/adapter/uhdf2/host/src/device_service_stub.c @@ -27,13 +27,12 @@ int DeviceServiceStubDispatch( struct HdfRemoteService *stub, int code, struct HdfSBuf *data, struct HdfSBuf *reply) { struct DeviceServiceStub *service = (struct DeviceServiceStub *)stub; - struct IDeviceIoService *ioService = service->super.deviceObject.service; int ret = HDF_FAILURE; #ifdef __USER__ pthread_rwlock_rdlock(&service->super.deviceObject.mutex); #endif - + struct IDeviceIoService *ioService = service->super.deviceObject.service; if (ioService == NULL) { #ifdef __USER__ pthread_rwlock_unlock(&service->super.deviceObject.mutex); -- Gitee