On Thu, 30 Jan 2014, Kumar Gaurav wrote: > Hi All, > > I have some questions regarding below two methods in > drivers/usr/core/urb.c source code. > > Methods: > void usb_kill_urb(struct urb *urb) > void usb_poison_urb(struct urb *urb) > > In both functions we have used `wait_event` method but haven't checked > for the condition `atomic_read(&urb->use_count) == 0` before going to sleep. > Should we add the check before putting the calling process to sleep or > avoiding check is intended (please explain if yes). We don't need to check, because wait_event checks the condition before it goes to sleep. Alan Stern -- 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