On Wed, 8 Nov 2006, Mariusz Kozlowski wrote: > Hello, > > Allright. As Greg KH suggested I split this big patch into smaller ones > to > make the changes easier to review. Having no better idea how to split that I > split it on a 'patch per file' basis. All those patches clean redundant 'if' > before > usb_unlink/free/kill_urb(): > > if (urb) > usb_free_urb(urb); /* unlink / free / kill */ > > I decided not to touch bigger 'if's like > > if (urb) { > usb_kill_urb(urb); > usb_free_urb(urb); > urb = NULL; > } > > as that would be probably too intrusive.
I encourage you to go ahead and change code sequences like that one also, whenever it's safe to do so. And by the way, don't worry about usb_kill_urb()'s might_sleep(). Nobody should ever call that routine in a non-sleepable context, even if urb is equal to NULL. If they do it's a programming error, and so having a warning message appear will be a good thing. Alan Stern ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel