drivers: usb_dc_mcux_ehci: use K_NO_WAIT in k_heap_alloc()
This is called in ISR context and timeout must be set
to K_NO_WAIT.
Reported-by: Pieter De Gendt <pieter.degendt@basalte.be>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
diff --git a/drivers/usb/device/usb_dc_mcux_ehci.c b/drivers/usb/device/usb_dc_mcux_ehci.c
index 5258989..f5d1928 100644
--- a/drivers/usb/device/usb_dc_mcux_ehci.c
+++ b/drivers/usb/device/usb_dc_mcux_ehci.c
@@ -211,9 +211,9 @@
block->data = NULL;
}
- block->data = k_heap_alloc(&ep_buf_pool, cfg->ep_mps, K_MSEC(10));
+ block->data = k_heap_alloc(&ep_buf_pool, cfg->ep_mps, K_NO_WAIT);
if (block->data == NULL) {
- LOG_ERR("Memory allocation time-out");
+ LOG_ERR("Failed to allocate memory");
return -ENOMEM;
}