From 26480057b9430344bd50e8b0cc0a4304c015cf34 Mon Sep 17 00:00:00 2001 From: jrhees-cae <61466710+jrhees-cae@users.noreply.github.com> Date: Wed, 28 Apr 2021 09:24:47 -0600 Subject: [PATCH] Bugfix: Linux KeyValueStoreManagerImpl::_Get was returning (#6327) CHIP_ERROR_BUFFER_TOO_SMALL when sufficient buffer was provided. Fixes regression introduced by #5620 --- src/platform/Linux/KeyValueStoreManagerImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/Linux/KeyValueStoreManagerImpl.cpp b/src/platform/Linux/KeyValueStoreManagerImpl.cpp index d94bc2bea1bbbe..afea3533866ffd 100644 --- a/src/platform/Linux/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Linux/KeyValueStoreManagerImpl.cpp @@ -52,7 +52,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t { return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; } - else if (err != CHIP_NO_ERROR) + else if ((err != CHIP_NO_ERROR) && (err != CHIP_ERROR_BUFFER_TOO_SMALL)) { return err; }