From 738f8a2d76c677153e0cf385588f412236f3f1fe Mon Sep 17 00:00:00 2001
From: Terence Hampson <thampson@google.com>
Date: Fri, 2 Aug 2024 18:51:14 +0000
Subject: [PATCH] Fix BridgedDeviceInformationCluster wildcard read

---
 .../fabric-bridge-common/src/ZCLCallbacks.cpp                  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp
index 7a9521fa7820a7..1655df4c2f1399 100644
--- a/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp
+++ b/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp
@@ -34,10 +34,9 @@ Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(Endpoin
                                                                          const EmberAfAttributeMetadata * attributeMetadata,
                                                                          uint8_t * buffer, uint16_t maxReadLength)
 {
-    uint16_t endpointIndex  = emberAfGetDynamicIndexFromEndpoint(endpoint);
     AttributeId attributeId = attributeMetadata->attributeId;
 
-    Device * dev = DeviceMgr().GetDevice(endpointIndex);
+    Device * dev = DeviceMgr().GetDevice(endpoint);
     if (dev != nullptr && clusterId == app::Clusters::BridgedDeviceBasicInformation::Id)
     {
         using namespace app::Clusters::BridgedDeviceBasicInformation::Attributes;