From 3917cc3e0b0055a08f064495c26174e9f376cf77 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 27 Oct 2021 11:30:52 -0700 Subject: [PATCH] Remove single entrance protection for registerAttributeAccessOverride (#10981) --- 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 }