[efr32] fix for trng entropy API (#6050)

When obtaining entropy data, trng_get_random checks the status for any
noise, and if so, cleans its queues and keeps the entropy accumulator
of mbedtls running.

In the process, TRNG might not have any new samples available, so a
zero length output is valid, and we should keep running rather than
exit fatally.
This commit is contained in:
suveshpratapa
2021-01-08 11:59:26 -08:00
committed by GitHub
parent d9acce1177
commit 9ec9070e9d
-1
View File
@@ -51,7 +51,6 @@ otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength)
// Non-zero return values for mbedtls_hardware_poll() signify an error has occurred
otEXPECT_ACTION(0 == mbedtls_hardware_poll(NULL, &aOutput[outputLen], remaining, &partialLen),
error = OT_ERROR_FAILED);
otEXPECT_ACTION(partialLen > 0, error = OT_ERROR_FAILED);
}
exit: