On Thu, Apr 19, 2012 at 7:17 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > On Thu, 19 Apr 2012, Yair E wrote: > > > Hi, > > While browsing the code I noticed that usb_init_urb() zeroes out the > > entire URB, including urb_list. > > urb_unlink() calls list_del_init which expects an initialized list, > > There is no urb_unlink() routine. Are you referring to > usb_hcd_unlink_urb_from_ep()? > Yes, it was called urb_unlink in a much older kernel version, sorry :-) > > but I could not locate where INIT_LIST_HEAD takes place (except upon > > error in usb_hcd_submit_urb()). > > It doesn't take place at all. urb->urb_list is set by the > list_add_tail() call in usb_hcd_link_urb_to_ep(). > > > Is this normal? > > In this case it's okay because usb_hcd_unlink_urb_from_ep() never gets > called unless urb->urb_list has already been added to the proper list > by usb_hcd_link_urb_to_ep(). > > Alan Stern > OK. I have a broken driver where this is not always the case... will fix it. Thanks! --Yair -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html