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>
This commit is contained in:
parent
8eeec634ea
commit
0500ec214c
1 changed files with 2 additions and 2 deletions
|
@ -211,9 +211,9 @@ int usb_dc_ep_configure(const struct usb_dc_ep_cfg_data *const cfg)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue