From c6cdf49b74c157be28b6260d46ca3dd5e9768c62 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 26 Oct 2021 07:52:58 -0700 Subject: [PATCH] Remove single entrance protection for registerAttributeAccessOverride --- src/app/clusters/descriptor/descriptor.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 571ab466fc47de..24b9633f76acb1 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -142,12 +142,6 @@ CHIP_ERROR DescriptorAttrAccess::Read(const ConcreteAttributePath & aPath, Attri void MatterDescriptorPluginServerInitCallback(void) { #if CHIP_CLUSTER_CONFIG_ENABLE_COMPLEX_ATTRIBUTE_READ - static bool attrAccessRegistered = false; - - if (!attrAccessRegistered) - { - registerAttributeAccessOverride(&gAttrAccess); - attrAccessRegistered = true; - } + registerAttributeAccessOverride(&gAttrAccess); #endif }