]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/host/ehci-hcd.c
Merge branch 'master' of git://git.infradead.org/users/cbou/linux-cns3xxx into devel...
[~andy/linux] / drivers / usb / host / ehci-hcd.c
index 06535405408c8a1dcd347da17e7c3d3b0e88555f..d0c8f7c03e05d599dc126e65eb1a8b64df927813 100644 (file)
@@ -1063,10 +1063,11 @@ rescan:
                                tmp && tmp != qh;
                                tmp = tmp->qh_next.qh)
                        continue;
-               /* periodic qh self-unlinks on empty */
-               if (!tmp)
-                       goto nogood;
-               unlink_async (ehci, qh);
+               /* periodic qh self-unlinks on empty, and a COMPLETING qh
+                * may already be unlinked.
+                */
+               if (tmp)
+                       unlink_async(ehci, qh);
                /* FALL THROUGH */
        case QH_STATE_UNLINK:           /* wait for hw to finish? */
        case QH_STATE_UNLINK_WAIT:
@@ -1083,7 +1084,6 @@ idle_timeout:
                }
                /* else FALL THROUGH */
        default:
-nogood:
                /* caller was supposed to have unlinked any requests;
                 * that's not our job.  just leak this memory.
                 */