git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
usb: xhci: Fix panic if disconnect
[pandora-kernel.git]
/
drivers
/
usb
/
host
/
xhci-hub.c
diff --git
a/drivers/usb/host/xhci-hub.c
b/drivers/usb/host/xhci-hub.c
index
8605813
..
13bb316
100644
(file)
--- a/
drivers/usb/host/xhci-hub.c
+++ b/
drivers/usb/host/xhci-hub.c
@@
-278,6
+278,9
@@
static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
ret = 0;
virt_dev = xhci->devs[slot_id];
+ if (!virt_dev)
+ return -ENODEV;
+
cmd = xhci_alloc_command(xhci, false, true, GFP_NOIO);
if (!cmd) {
xhci_dbg(xhci, "Couldn't allocate command structure.\n");