diff --git a/examples/energy-management-app/energy-management-common/common/src/EnergyManagementAppCommonMain.cpp b/examples/energy-management-app/energy-management-common/common/src/EnergyManagementAppCommonMain.cpp index 8d7855a1fb3b93..a6b8e6747debb7 100644 --- a/examples/energy-management-app/energy-management-common/common/src/EnergyManagementAppCommonMain.cpp +++ b/examples/energy-management-app/energy-management-common/common/src/EnergyManagementAppCommonMain.cpp @@ -283,10 +283,10 @@ CHIP_ERROR EnergyManagementCommonClustersInit(chip::EndpointId endpointId) ElectricalPowerMeasurementInit(endpointId); PowerTopologyInit(endpointId); } - VerifyOrReturnError((!gDEMDelegate && !gDEMInstance), CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError((!gEPMDelegate && !gEPMInstance), CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError((!gPTDelegate && !gPTInstance), CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError((!gEEMAttrAccess), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gDEMDelegate && gDEMInstance, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gEPMDelegate && gEPMInstance, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gPTDelegate && gPTInstance, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gEEMAttrAccess, CHIP_ERROR_INCORRECT_STATE); gCommonClustersInitialized = true; return CHIP_NO_ERROR; }