From: Mariusz Kozlowski <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
Documentation/DocBook/writing_usb_driver.tmpl | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Documentation/DocBook/writing_usb_driver.tmpl
b/Documentation/DocBook/writing_usb_driver.tmpl
index 07cd34c..d4188d4 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 u
usb_buffer_free (dev->udev, dev->bulk_out_size,
dev->bulk_out_buffer,
dev->write_urb->transfer_dma);
- if (dev->write_urb != NULL)
- usb_free_urb (dev->write_urb);
+ usb_free_urb (dev->write_urb);
kfree (dev);
}
</programlisting>
--
1.4.4.1
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel