summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-07-25 22:01:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-02 00:58:59 +0200
commita0ee619f3ce8d8478c0cdd944b6cb24453ab6297 (patch)
tree05086014d9e8f3d4b08c22531ded0a00c9203dc4 /drivers/usb/host/xhci-ring.c
parentxhci: Rename Asrock P67 pci product-id to EJ168 (diff)
downloadlinux-a0ee619f3ce8d8478c0cdd944b6cb24453ab6297.tar.xz
linux-a0ee619f3ce8d8478c0cdd944b6cb24453ab6297.zip
xhci: Add missing checks for xhci_alloc_command failure
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 749fc68eb5c1..60fb52ae864b 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1118,6 +1118,10 @@ static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id,
if (xhci->quirks & XHCI_RESET_EP_QUIRK) {
struct xhci_command *command;
command = xhci_alloc_command(xhci, false, false, GFP_ATOMIC);
+ if (!command) {
+ xhci_warn(xhci, "WARN Cannot submit cfg ep: ENOMEM\n");
+ return;
+ }
xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
"Queueing configure endpoint command");
xhci_queue_configure_endpoint(xhci, command,