entropy: fake_entropy: Fix return value in isr callback

get_entropy_isr() has to return the number of bytes copied or
a negative value in case of error.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2023-10-05 20:40:21 +00:00 committed by Carles Cufí
parent 58b0c8f4b7
commit 1dcaf4637e

View file

@ -59,7 +59,9 @@ static int entropy_native_posix_get_entropy_isr(const struct device *dev,
* entropy_native_posix_get_entropy() is also safe for ISRs
* and always produces data.
*/
return entropy_native_posix_get_entropy(dev, buf, len);
entropy_native_posix_get_entropy(dev, buf, len);
return len;
}
static int entropy_native_posix_init(const struct device *dev)