diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index 6c3dbef4573f35..09e3393e07b1b1 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -156,10 +156,7 @@ CHIP_ERROR CC13X2_26X2Config::ReadConfigValueBin(Key key, uint8_t * buf, size_t VerifyOrExit(sNvoctpFps.readItem(key.nvID, 0, (uint16_t) len, buf) == NVINTF_SUCCESS, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - if (outLen) - { - outLen = len; - } + outLen = len; exit: return err; diff --git a/src/platform/cc32xx/CC32XXConfig.cpp b/src/platform/cc32xx/CC32XXConfig.cpp index cdc59cd6d37ada..173b2864e3c2c0 100644 --- a/src/platform/cc32xx/CC32XXConfig.cpp +++ b/src/platform/cc32xx/CC32XXConfig.cpp @@ -378,10 +378,7 @@ CHIP_ERROR CC32XXConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSi VerifyOrReturnError(pEntry != nullptr, CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); pEntry->ReadVal(buf, bufSize); - if (outLen) - { - outLen = pEntry->Len(); - } + outLen = pEntry->Len(); return CHIP_NO_ERROR; }