1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

usbus: don't trigger assertion in usbus_urb_submit()

This commit is contained in:
Benjamin Valentin 2023-05-24 18:25:34 +02:00
parent 40d0f64a04
commit 153dbd2495

View File

@ -282,7 +282,11 @@ static void _usbus_transfer_urb_submit(usbus_endpoint_t *usbus_ep,
void usbus_urb_submit(usbus_t *usbus, usbus_endpoint_t *endpoint, usbus_urb_t *urb)
{
(void)usbus;
assert(!(clist_find(&endpoint->urb_list, &urb->list)));
if (clist_find(&endpoint->urb_list, &urb->list)) {
return;
}
if (endpoint->ep->dir == USB_EP_DIR_IN &&
((urb->len % endpoint->maxpacketsize) == 0) &&
usbus_urb_isset_flag(urb, USBUS_URB_FLAG_AUTO_ZLP)) {