summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-12-14 23:58:54 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-14 23:58:53 -0800
commitdf0c65ec104c8a0c5ccdc02fda56f31ac7fe5bdc (patch)
tree7913bec67110cb6d9531d6b72f4c770d9955a81a /drivers/usb
parentdb87e2310e4eead66d2c29a4d51ec5946dddf0dc (diff)
parent3bda2b55b41dacecc8fdf44d9066e54b3a0b827a (diff)
Merge "Merge android-4.4.96 (aed4c54) into msm-4.4"
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-hub.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index fae1222d4bc8..250a4449ac51 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -397,25 +397,25 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
GFP_NOWAIT);
if (!command) {
spin_unlock_irqrestore(&xhci->lock, flags);
- xhci_free_command(xhci, cmd);
- return -ENOMEM;
-
+ ret = -ENOMEM;
+ goto cmd_cleanup;
}
ret = xhci_queue_stop_endpoint(xhci, command, slot_id,
- i, suspend);
+ i, suspend);
if (ret) {
spin_unlock_irqrestore(&xhci->lock, flags);
xhci_free_command(xhci, command);
- goto err_cmd_queue;
+ goto cmd_cleanup;
}
}
}
ret = xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
if (ret) {
spin_unlock_irqrestore(&xhci->lock, flags);
- goto err_cmd_queue;
+ goto cmd_cleanup;
}
+
xhci_ring_cmd_db(xhci);
spin_unlock_irqrestore(&xhci->lock, flags);
@@ -427,7 +427,7 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
ret = -ETIME;
}
-err_cmd_queue:
+cmd_cleanup:
xhci_free_command(xhci, cmd);
return ret;
}