This is a note to let you know that I've just added the patch titled
Subject: USB: Make usb_buffer_free() NULL-safe
to my gregkh-2.6 tree. Its filename is
usb-make-usb_buffer_free-null-safe.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From [EMAIL PROTECTED] Tue Aug 1 19:33:39 2006
From: Dmitry Torokhov <[EMAIL PROTECTED]>
To: linux-usb-devel <[email protected]>
Subject: USB: Make usb_buffer_free() NULL-safe
Date: Tue, 1 Aug 2006 22:33:34 -0400
Cc: Greg KH <[EMAIL PROTECTED]>
Content-Disposition: inline
Message-Id: <[EMAIL PROTECTED]>
kfree() handles NULL arguments which is handy in error handling paths as one
does need to insert bunch of ifs. How about making usb_buffer_free() do the
same?
Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
drivers/usb/core/usb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- gregkh-2.6.orig/drivers/usb/core/usb.c
+++ gregkh-2.6/drivers/usb/core/usb.c
@@ -568,7 +568,9 @@ void usb_buffer_free (
)
{
if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_free)
- return;
+ return;
+ if (!addr)
+ return;
dev->bus->op->buffer_free (dev->bus, size, addr, dma);
}
Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are
usb/usb-make-usb_buffer_free-null-safe.patch
-------------------------------------------------------------------------
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