diff options
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
| -rw-r--r-- | drivers/usb/host/xhci-mem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index f8336408ef07..9a8c936cd42c 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
| @@ -1427,10 +1427,10 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
| 1427 | /* Attempt to use the ring cache */ | 1427 | /* Attempt to use the ring cache */ |
| 1428 | if (virt_dev->num_rings_cached == 0) | 1428 | if (virt_dev->num_rings_cached == 0) |
| 1429 | return -ENOMEM; | 1429 | return -ENOMEM; |
| 1430 | virt_dev->num_rings_cached--; | ||
| 1430 | virt_dev->eps[ep_index].new_ring = | 1431 | virt_dev->eps[ep_index].new_ring = |
| 1431 | virt_dev->ring_cache[virt_dev->num_rings_cached]; | 1432 | virt_dev->ring_cache[virt_dev->num_rings_cached]; |
| 1432 | virt_dev->ring_cache[virt_dev->num_rings_cached] = NULL; | 1433 | virt_dev->ring_cache[virt_dev->num_rings_cached] = NULL; |
| 1433 | virt_dev->num_rings_cached--; | ||
| 1434 | xhci_reinit_cached_ring(xhci, virt_dev->eps[ep_index].new_ring, | 1434 | xhci_reinit_cached_ring(xhci, virt_dev->eps[ep_index].new_ring, |
| 1435 | 1, type); | 1435 | 1, type); |
| 1436 | } | 1436 | } |
| @@ -1792,7 +1792,8 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
| 1792 | int size; | 1792 | int size; |
| 1793 | int i, j, num_ports; | 1793 | int i, j, num_ports; |
| 1794 | 1794 | ||
| 1795 | del_timer_sync(&xhci->cmd_timer); | 1795 | if (timer_pending(&xhci->cmd_timer)) |
| 1796 | del_timer_sync(&xhci->cmd_timer); | ||
| 1796 | 1797 | ||
| 1797 | /* Free the Event Ring Segment Table and the actual Event Ring */ | 1798 | /* Free the Event Ring Segment Table and the actual Event Ring */ |
| 1798 | size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); | 1799 | size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); |
