diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/uhci-q.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 19a0cc02b9a..4aed305982e 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
@@ -123,10 +123,14 @@ static struct uhci_td *uhci_alloc_td(struct uhci_hcd *uhci) | |||
123 | 123 | ||
124 | static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) | 124 | static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) |
125 | { | 125 | { |
126 | if (!list_empty(&td->list)) | 126 | if (!list_empty(&td->list)) { |
127 | dev_warn(uhci_dev(uhci), "td %p still in list!\n", td); | 127 | dev_warn(uhci_dev(uhci), "td %p still in list!\n", td); |
128 | if (!list_empty(&td->fl_list)) | 128 | WARN_ON(1); |
129 | } | ||
130 | if (!list_empty(&td->fl_list)) { | ||
129 | dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td); | 131 | dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td); |
132 | WARN_ON(1); | ||
133 | } | ||
130 | 134 | ||
131 | dma_pool_free(uhci->td_pool, td, td->dma_handle); | 135 | dma_pool_free(uhci->td_pool, td, td->dma_handle); |
132 | } | 136 | } |
@@ -291,8 +295,10 @@ static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci, | |||
291 | static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) | 295 | static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) |
292 | { | 296 | { |
293 | WARN_ON(qh->state != QH_STATE_IDLE && qh->udev); | 297 | WARN_ON(qh->state != QH_STATE_IDLE && qh->udev); |
294 | if (!list_empty(&qh->queue)) | 298 | if (!list_empty(&qh->queue)) { |
295 | dev_warn(uhci_dev(uhci), "qh %p list not empty!\n", qh); | 299 | dev_warn(uhci_dev(uhci), "qh %p list not empty!\n", qh); |
300 | WARN_ON(1); | ||
301 | } | ||
296 | 302 | ||
297 | list_del(&qh->node); | 303 | list_del(&qh->node); |
298 | if (qh->udev) { | 304 | if (qh->udev) { |
@@ -740,9 +746,11 @@ static void uhci_free_urb_priv(struct uhci_hcd *uhci, | |||
740 | { | 746 | { |
741 | struct uhci_td *td, *tmp; | 747 | struct uhci_td *td, *tmp; |
742 | 748 | ||
743 | if (!list_empty(&urbp->node)) | 749 | if (!list_empty(&urbp->node)) { |
744 | dev_warn(uhci_dev(uhci), "urb %p still on QH's list!\n", | 750 | dev_warn(uhci_dev(uhci), "urb %p still on QH's list!\n", |
745 | urbp->urb); | 751 | urbp->urb); |
752 | WARN_ON(1); | ||
753 | } | ||
746 | 754 | ||
747 | list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { | 755 | list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { |
748 | uhci_remove_td_from_urbp(td); | 756 | uhci_remove_td_from_urbp(td); |