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:
Emil Obalski 2020-05-20 16:00:06 +02:00 committed by Carles Cufí
commit 2a2d92f9c2

View file

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