From jesper.juhl@gmail.com Thu Oct 13 13:21:11 2005 From: Jesper Juhl Subject: Driver Core: Big kfree NULL check cleanup - Documentation Date: Thu, 13 Oct 2005 21:31:08 +0200 Cc: Andrew Morton , "Greg Kroah-Hartman" , Jesper Juhl Content-Disposition: inline Message-Id: <200510132131.09134.jesper.juhl@gmail.com> This is the Documentation/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in example code in Documentation/. Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman --- Documentation/DocBook/writing_usb_driver.tmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- gregkh-2.6.orig/Documentation/DocBook/writing_usb_driver.tmpl +++ gregkh-2.6/Documentation/DocBook/writing_usb_driver.tmpl @@ -345,8 +345,7 @@ if (!retval) { static inline void skel_delete (struct usb_skel *dev) { - if (dev->bulk_in_buffer != NULL) - kfree (dev->bulk_in_buffer); + kfree (dev->bulk_in_buffer); if (dev->bulk_out_buffer != NULL) usb_buffer_free (dev->udev, dev->bulk_out_size, dev->bulk_out_buffer,