Skip to content

Commit

Permalink
Small fix to avoid calling KVS init twice (#25917)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucicop authored and pull[bot] committed Jul 19, 2023
1 parent 032a468 commit 4358568
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/platform/qpg/qpgConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4358568

Please sign in to comment.