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:
Johann Fischer 2021-07-13 17:12:57 +02:00 committed by Maureen Helm
commit 0500ec214c

View file

@ -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;
}