diff --git a/core/common/src/hdf_attribute.c b/core/common/src/hdf_attribute.c index 83b609fd2519574ba2e4a60e80d3eeadee3aea2d..60489352f5c2857d097976cf6fe566fde269a128 100644 --- a/core/common/src/hdf_attribute.c +++ b/core/common/src/hdf_attribute.c @@ -310,8 +310,7 @@ bool HdfDeviceListAdd(const char *moduleName, const char *serviceName) if (deviceInfo->moduleName == NULL) { continue; } - if (strcmp(deviceInfo->moduleName, moduleName) == 0) { - deviceInfo->isDynamic = true; + if (strcmp(deviceInfo->moduleName, moduleName) == 0) { deviceNodeInfo->hostId = deviceInfo->hostId; deviceNodeInfo->deviceId = hostClnt->devCount; deviceNodeInfo->policy = deviceInfo->policy; @@ -330,6 +329,7 @@ bool HdfDeviceListAdd(const char *moduleName, const char *serviceName) break; } deviceNodeInfo->svcName = svcName; + deviceNodeInfo->isDynamic = true; HdfSListAdd(hostClnt->deviceInfos, &deviceNodeInfo->node); hostClnt->devCount++; return true;