Skip to content

Commit

Permalink
[PATCH] Driver Core: Big kfree NULL check cleanup - Documentation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Juhl authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent ad7e14a commit a3a3395
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Documentation/DocBook/writing_usb_driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a3a3395

Please sign in to comment.