Hans de Goede 1e3452e3f0 xhci: Move allocating of command for new_dequeue_state to queue_set_tr_deq()
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@redhat.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 21:46:10 -07:00
..
2013-12-03 10:34:33 -08:00
2013-10-19 14:08:04 -07:00
2013-05-30 21:34:31 +09:00
2013-12-03 10:34:33 -08:00
2013-12-03 10:34:33 -08:00
2013-07-31 17:53:50 -07:00
2013-12-18 16:36:10 -08:00
2014-01-23 18:49:36 -08:00
2013-12-03 10:34:33 -08:00
2013-01-24 13:42:09 -08:00