aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2006-11-08 09:33:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:23:31 -0500
commit3c8961ee6d93c5a2ddf34d8d8171dd685538722b (patch)
tree1a096ce35e8a21251e1c7ffc9bd8308e55b7b893 /Documentation/DocBook
parent444f4f91fda54bea57a0e31098a75f54548e8b28 (diff)
usb: writing_usb_driver free urb cleanup
Allright. As Greg KH suggested I split this big patch into smaller ones to make the changes easier to review. Having no better idea how to split that I split it on a 'patch per file' basis. All those patches clean redundant 'if' before usb_unlink/free/kill_urb(): if (urb) usb_free_urb(urb); /* unlink / free / kill */ I decided not to touch bigger 'if's like if (urb) { usb_kill_urb(urb); usb_free_urb(urb); urb = NULL; } as that would be probably too intrusive. One of patches also fixes drivers/usb/misc/auerswald.c memleak I found when digging the code. All those patches are against 2.6.19-rc4. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/writing_usb_driver.tmpl3
1 files changed, 1 insertions, 2 deletions
diff --git a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl
index 07cd34c1940b..d4188d4ff535 100644
--- a/Documentation/DocBook/writing_usb_driver.tmpl
+++ b/Documentation/DocBook/writing_usb_driver.tmpl
@@ -345,8 +345,7 @@ static inline void skel_delete (struct usb_skel *dev)
345 usb_buffer_free (dev->udev, dev->bulk_out_size, 345 usb_buffer_free (dev->udev, dev->bulk_out_size,
346 dev->bulk_out_buffer, 346 dev->bulk_out_buffer,
347 dev->write_urb->transfer_dma); 347 dev->write_urb->transfer_dma);
348 if (dev->write_urb != NULL) 348 usb_free_urb (dev->write_urb);
349 usb_free_urb (dev->write_urb);
350 kfree (dev); 349 kfree (dev);
351} 350}
352 </programlisting> 351 </programlisting>