]> err.no Git - linux-2.6/commitdiff
[PATCH] Driver Core: Big kfree NULL check cleanup - Documentation
authorJesper Juhl <jesper.juhl@gmail.com>
Thu, 13 Oct 2005 19:31:08 +0000 (21:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 16:52:55 +0000 (09:52 -0700)
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 <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/DocBook/writing_usb_driver.tmpl

index 51f3bfb6fb6e31ef98e561a884dab0095facaf7f..008a341234d0ca48848b216038fc0f900d235b0e 100644 (file)
@@ -345,8 +345,7 @@ if (!retval) {
   <programlisting>
 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,