diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index 4dfffcbb8907b3..99398867ccfa68 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -1619,12 +1619,9 @@ - (void)invalidateCASESessionForNode:(NSNumber *)nodeID; - (void)operationalInstanceAdded:(NSNumber *)nodeID { - // Don't use deviceForNodeID here, because we don't want to create the - // device if it does not already exist. - os_unfair_lock_lock(self.deviceMapLock); - MTRDevice * device = [self.nodeIDToDeviceMap objectForKey:nodeID]; - os_unfair_lock_unlock(self.deviceMapLock); - + // If we don't have an existing MTRDevice for this node ID, that's fine; + // nothing to do. + MTRDevice * device = [self _deviceForNodeID:nodeID createIfNeeded:NO]; if (device == nil) { return; }