Skip to content

Commit a1b5aee

Browse files
mstasiaknordicjaz1-nordic
authored andcommitted
[nrf fromlist] drivers: adc: nrfx_adc: 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 3d5da99 commit a1b5aee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/adc/adc_nrfx_adc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,12 @@ static int init_adc(const struct device *dev)
265265
{
266266
const nrfx_adc_config_t config = NRFX_ADC_DEFAULT_CONFIG;
267267

268-
nrfx_err_t result = nrfx_adc_init(&config, event_handler);
268+
int result = nrfx_adc_init(&config, event_handler);
269269

270-
if (result != NRFX_SUCCESS) {
270+
if (result != 0) {
271271
LOG_ERR("Failed to initialize device: %s",
272272
dev->name);
273-
return -EBUSY;
273+
return result;
274274
}
275275

276276
IRQ_CONNECT(DT_INST_IRQN(0), DT_INST_IRQ(0, priority),

0 commit comments

Comments
 (0)