usb: usb_dc_stm32: Return EAGAIN on lock failure
Return -EAGAIN on k_sem_take() failure to take write lock, the error code is similar to nrfx write_in_progress flag. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
be1ec7822c
commit
5a4a658de1
1 changed files with 2 additions and 2 deletions
|
@ -737,8 +737,8 @@ int usb_dc_ep_write(const u8_t ep, const u8_t *const data,
|
|||
|
||||
ret = k_sem_take(&ep_state->write_sem, K_NO_WAIT);
|
||||
if (ret) {
|
||||
LOG_ERR("Unable to write ep 0x%02x (%d)", ep, ret);
|
||||
return ret;
|
||||
LOG_ERR("Unable to get write lock (%d)", ret);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
if (!k_is_in_isr()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue