drivers: entropy: smartbond: Bug fix

This commit should fix few wrong expressions

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit is contained in:
Ioannis Karachalios 2024-05-14 16:57:49 +03:00 committed by Anas Nashif
parent 43039afbdf
commit 97bd924f59

View file

@ -317,11 +317,11 @@ static int entropy_smartbond_get_entropy_isr(const struct device *dev, uint8_t *
} }
NVIC_ClearPendingIRQ(IRQN); NVIC_ClearPendingIRQ(IRQN);
if (random_word_get(buf) != 0) { if (random_word_get(bytes) != 0) {
continue; continue;
} }
while (ptr < limit) { while (ptr < limit && len) {
buf[--len] = *ptr++; buf[--len] = *ptr++;
} }
/* Store remaining data for later use */ /* Store remaining data for later use */