On 07/25/2014 11:01 PM, Hans de Goede wrote: > There are multiple reasons for this: > > 1) This fixes a missing check for xhci_alloc_command failing in > xhci_handle_cmd_stop_ep() > 2) This adds a warning when we cannot set the new dequeue state because of > xhci_alloc_command failing > 3) It puts the allocation of the command after the sanity checks in > queue_set_tr_deq(), avoiding leaking the command if those fail > 4) Since queue_set_tr_deq now owns the command it can free it if queue_command > fails > 5) It reduces code duplication > > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Looks very good, good stuff. Thanks I haven't tried this one out, I'll wait for the rebased version. -Mathias -- 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