xhci: remove unnecessary check for pending timer
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 23 Jan 2017 12:19:54 +0000 (14:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 09:57:35 +0000 (10:57 +0100)
Checking if the command timeout timer is pending when queueing the
first command to the command ring is not really useful, remove it.

Suggested-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c

index 2ce132b44525589effbdfce33cdd4b6629bcb70c..8ccd24eca3672ed0eca0be4a058e363cd27960b1 100644 (file)
@@ -3815,8 +3815,7 @@ static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
        list_add_tail(&cmd->cmd_list, &xhci->cmd_list);
 
        /* if there are no other commands queued we start the timeout timer */
-       if (xhci->cmd_list.next == &cmd->cmd_list &&
-           !delayed_work_pending(&xhci->cmd_timer)) {
+       if (xhci->cmd_list.next == &cmd->cmd_list) {
                xhci->current_cmd = cmd;
                xhci_mod_cmd_timer(xhci, XHCI_CMD_DEFAULT_TIMEOUT);
        }