usb: driver: nordic: Unlock mutex in case of error.
Mutex that was previously locked must be unlocked in case of an error. Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
parent
b2da4e24cb
commit
2a2d92f9c2
1 changed files with 1 additions and 0 deletions
|
@ -1862,6 +1862,7 @@ int usb_dc_ep_read_continue(u8_t ep)
|
|||
struct usbd_event *ev = usbd_evt_alloc();
|
||||
|
||||
if (!ev) {
|
||||
k_mutex_unlock(&ctx->drv_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue