Skip to content

Commit 4dc922b

Browse files
[nrf fromlist] drivers: entropy: nrf_cracen: align to errno codes in nrfx
NRFX drivers now return errno codes, aligned driver. Upstream PR #: 97997 Signed-off-by: Michał Stasiak <[email protected]>
1 parent 6bbf912 commit 4dc922b

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

drivers/entropy/entropy_nrf_cracen.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ static int nrf_cracen_get_entropy_isr(const struct device *dev, uint8_t *buf, ui
2323

2424
irq_unlock(key);
2525

26-
if (likely(ret == NRFX_SUCCESS)) {
26+
if (likely(ret == 0)) {
2727
return len;
28-
} else if (ret == NRFX_ERROR_INVALID_PARAM) {
29-
return -EINVAL;
3028
} else {
31-
return -EAGAIN;
29+
return ret;
3230
}
3331
}
3432

@@ -47,13 +45,7 @@ static int nrf_cracen_cracen_init(const struct device *dev)
4745
{
4846
(void)dev;
4947

50-
int ret = nrfx_cracen_ctr_drbg_init();
51-
52-
if (ret == NRFX_SUCCESS) {
53-
return 0;
54-
} else {
55-
return -EIO;
56-
}
48+
return nrfx_cracen_ctr_drbg_init();
5749
}
5850

5951
static DEVICE_API(entropy, nrf_cracen_api_funcs) = {

0 commit comments

Comments
 (0)