diff options
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index d61fcc48099e..730b9fd26685 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -386,6 +386,9 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend) | |||
386 | 386 | ||
387 | ret = 0; | 387 | ret = 0; |
388 | virt_dev = xhci->devs[slot_id]; | 388 | virt_dev = xhci->devs[slot_id]; |
389 | if (!virt_dev) | ||
390 | return -ENODEV; | ||
391 | |||
389 | cmd = xhci_alloc_command(xhci, false, true, GFP_NOIO); | 392 | cmd = xhci_alloc_command(xhci, false, true, GFP_NOIO); |
390 | if (!cmd) { | 393 | if (!cmd) { |
391 | xhci_dbg(xhci, "Couldn't allocate command structure.\n"); | 394 | xhci_dbg(xhci, "Couldn't allocate command structure.\n"); |