Skip to content

Commit

Permalink
Merge #19664
Browse files Browse the repository at this point in the history
19664: usbus: don't trigger assertion in usbus_urb_submit() r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
  • Loading branch information
bors[bot] and benpicco authored May 31, 2023
2 parents 67c011f + 153dbd2 commit d742513
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sys/usb/usbus/usbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d742513

Please sign in to comment.