fix usb_osal_enter_critical_section in usbh_submit_urb

This commit is contained in:
sakimisu
2022-12-15 20:18:53 +08:00
parent 43a45fc2fc
commit 82596cea4b
2 changed files with 5 additions and 4 deletions

View File

@@ -650,8 +650,6 @@ int usbh_submit_urb(struct usbh_urb *urb)
return -EINVAL;
}
flags = usb_osal_enter_critical_section();
if (!pipe->hport->connected) {
return -ENODEV;
}
@@ -660,6 +658,8 @@ int usbh_submit_urb(struct usbh_urb *urb)
return -EBUSY;
}
flags = usb_osal_enter_critical_section();
pipe->waiter = false;
pipe->xfrd = 0;
pipe->urb = urb;