MFp4: //depot/projects/usb@155754
Make sure that the cancelled error code is always checked and result in a return from the USB callback. Submitted by: Hans Petter Selasky
This commit is contained in:
parent
204793b247
commit
a767337039
@ -2921,6 +2921,8 @@ uaudio_mixer_write_cfg_callback(struct usb2_xfer *xfer)
|
||||
uint8_t chan;
|
||||
uint8_t buf[2];
|
||||
|
||||
DPRINTF("\n");
|
||||
|
||||
switch (USB_GET_STATE(xfer)) {
|
||||
case USB_ST_TRANSFERRED:
|
||||
tr_transferred:
|
||||
@ -2980,11 +2982,14 @@ uaudio_mixer_write_cfg_callback(struct usb2_xfer *xfer)
|
||||
if (repeat) {
|
||||
goto tr_setup;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
default: /* Error */
|
||||
DPRINTF("error=%s\n", usb2_errstr(xfer->error));
|
||||
|
||||
if (xfer->error == USB_ERR_CANCELLED) {
|
||||
/* do nothing - we are detaching */
|
||||
break;
|
||||
}
|
||||
goto tr_transferred;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user