This is a minor cleanup that replaces a test for non-null urb->hcpriv with "is the urb on this list". HCDs don't need to use hcpriv in that way, and in general this is a safer way to test that. (AIO does much the same thing in its kiocb cancelation paths.)
Please merge.
- Dave
--- 1.74/drivers/usb/core/hcd.c Fri Aug 29 11:16:13 2003 +++ edited/drivers/usb/core/hcd.c Sun Dec 7 12:29:05 2003 @@ -1165,6 +1165,7 @@ struct device *sys = 0; unsigned long flags; struct completion_splice splice; + struct list_head *tmp; int retval; if (!urb) @@ -1203,7 +1204,12 @@ */ WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT); - if (!urb->hcpriv) { + /* insist the urb is still queued */ + list_for_each(tmp, &dev->urb_list) { + if (tmp == &urb->urb_list) + break; + } + if (tmp != &urb->urb_list) { retval = -EINVAL; goto done; }