On Wed, Dec 17, 2003 at 12:29:45PM -0500, John Homppi wrote: Hm, your email address keeps chainging, I have some bounces to your old one around here...
> [EMAIL PROTECTED] wrote: > >Date: Sat, 13 Dec 2003 15:37:23 -0800 > >From: Greg KH <[EMAIL PROTECTED]> > >To: John Homppi <[EMAIL PROTECTED]> > ........some lines snipped ....... > >> + if (dev->interrupt_out_buffer != NULL) { > >> + kfree (dev->interrupt_out_buffer); > >> + } > >> + kfree (dev); > > > >kfree can handle NULL as a paramater. You don't need to check it every > >time. > > But when I look at usb-skeleton.c in the 2.6.0-test11 tree I see that it > checks for NULL before calling kfree. > > static inline void skel_delete (struct usb_skel *dev) > { > if (dev->bulk_in_buffer != NULL) > kfree (dev->bulk_in_buffer); Yes that one check can go away. Care to send me a patch? thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel