diff --git a/src/credentials/GroupDataProvider.h b/src/credentials/GroupDataProvider.h index c9f0b64444edff..3c95f955b23edd 100644 --- a/src/credentials/GroupDataProvider.h +++ b/src/credentials/GroupDataProvider.h @@ -400,7 +400,7 @@ inline CHIP_ERROR SetSingleIpkEpochKey(GroupDataProvider * provider, FabricIndex * * Callers have to externally synchronize usage of this function. * - * @return The global Group Data Provider. Assume never null. + * @return The global Group Data Provider */ GroupDataProvider * GetGroupDataProvider(); @@ -409,9 +409,9 @@ GroupDataProvider * GetGroupDataProvider(); * * Callers have to externally synchronize usage of this function. * - * If the `provider` is nullptr, no change is done. + * The `provider` can be set to nullptr if the owner is done with it fully. * - * @param[in] provider the Group Data Provider + * @param[in] provider pointer to the Group Data Provider global isntance to use */ void SetGroupDataProvider(GroupDataProvider * provider); diff --git a/src/credentials/GroupDataProviderImpl.cpp b/src/credentials/GroupDataProviderImpl.cpp index 25367f83e28868..6047bfd3a45daa 100644 --- a/src/credentials/GroupDataProviderImpl.cpp +++ b/src/credentials/GroupDataProviderImpl.cpp @@ -2015,33 +2015,14 @@ GroupDataProvider * gGroupsProvider = nullptr; } // namespace -/** - * Instance getter for the global GroupDataProvider. - * - * Callers have to externally synchronize usage of this function. - * - * @return The global device attestation credentials provider. Assume never null. - */ GroupDataProvider * GetGroupDataProvider() { return gGroupsProvider; } -/** - * Instance setter for the global GroupDataProvider. - * - * Callers have to externally synchronize usage of this function. - * - * If the `provider` is nullptr, no change is done. - * - * @param[in] provider the GroupDataProvider to start returning with the getter - */ void SetGroupDataProvider(GroupDataProvider * provider) { - if (provider) - { - gGroupsProvider = provider; - } + gGroupsProvider = provider; } } // namespace Credentials