On 01/19/2012 08:33 AM, Sarah Sharp wrote: > On Wed, Jan 18, 2012 at 05:47:12PM +0800, Andiry Xu wrote: >> When a TD length mismatch is found during isoc TRB enqueue, it directly >> returns -EINVAL. However, isoc transfer is partially enqueued at this time, >> and the ring should be cleared. > > Did you run up against the TD length mismatch, or did you just notice > this path? > Just notice this path when checking the code. Thanks, Andiry > > >> Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx> >> --- >> drivers/usb/host/xhci-ring.c | 3 ++- >> 1 files changed, 2 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c >> index 36b1691..af9b492 100644 >> --- a/drivers/usb/host/xhci-ring.c >> +++ b/drivers/usb/host/xhci-ring.c >> @@ -3376,7 +3376,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, >> /* Check TD length */ >> if (running_total != td_len) { >> xhci_err(xhci, "ISOC TD length unmatch\n"); >> - return -EINVAL; >> + ret = -EINVAL; >> + goto cleanup; >> } >> } >> >> -- >> 1.7.4.1 >> >> > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html