From 435856858a3028d53c133118b13a243a1b3b368d Mon Sep 17 00:00:00 2001 From: lucicop Date: Tue, 11 Apr 2023 21:45:05 +0300 Subject: [PATCH] Small fix to avoid calling KVS init twice (#25917) --- src/platform/qpg/qpgConfig.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/platform/qpg/qpgConfig.cpp b/src/platform/qpg/qpgConfig.cpp index cb104485bedfca..562ed7d837d3bb 100644 --- a/src/platform/qpg/qpgConfig.cpp +++ b/src/platform/qpg/qpgConfig.cpp @@ -40,18 +40,8 @@ namespace Internal { CHIP_ERROR QPGConfig::Init() { - const qvStatus_t status = qvCHIP_KvsInit(); - - if (QV_STATUS_NO_ERROR == status) - { - return CHIP_NO_ERROR; - } - else if (QV_STATUS_BUFFER_TOO_SMALL == status) - { - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - - return CHIP_ERROR_INTERNAL; + // KVS will already be initialized in qvCHIP_Init before this is called from CHIP stack + return CHIP_NO_ERROR; } CHIP_ERROR QPGConfig::ReadConfigValue(Key key, bool & val)