diff --git a/adapter/uhdf2/host/src/device_service_stub.c b/adapter/uhdf2/host/src/device_service_stub.c index 572a6336c13a98523a20a432aa76e0a507b23eca..07e73631c49e6b7c0c9bfecdf3349e50b035d3a1 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);