Skip to contentSkip to conversation

Big kfree NULL check cleanup - Documentation

PATCH In review Jesper Juhl 1 participant 1 message Oct 13, 2005 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 14/14 Big kfree NULL check cleanup - Documentation

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/.

---

Please see the initial announcement mail on LKML with subject "[PATCH 00/14] Big kfree NULL check cleanup"
for additional details.

 Documentation/DocBook/writing_usb_driver.tmpl |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)
Documentation/DocBook/writing_usb_driver.tmpl +1 -2
@@ -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,