From 9bf15ff968058340dd5b76525cbbbcdf8623ba9b Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Sat, 9 Jul 2022 05:53:26 -0700 Subject: [PATCH] fix GetSerialNumber when CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER is used (#20475) (#20494) Co-authored-by: eve-cxrp <80681009+eve-cxrp@users.noreply.github.com> --- .../platform/internal/GenericDeviceInstanceInfoProvider.ipp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp index 4081c7c9e0da93..12eb6bee7e3a39 100644 --- a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp +++ b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp @@ -66,6 +66,7 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetSerialNumber(char ReturnErrorCodeIf(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) > bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER, sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER)); serialNumLen = sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) - 1; + err = CHIP_NO_ERROR; } #endif // CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER ReturnErrorOnFailure(err);