Files
linux/drivers/usb/gadget
Julia Lawall 4b8e12336f USB: gadget: Use kmemdup
Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20 13:21:49 -07:00
..
2010-05-20 13:21:49 -07:00
2009-01-07 09:59:58 -08:00
2010-03-02 14:53:40 -08:00
2010-05-20 13:21:35 -07:00
2009-07-12 12:22:34 -07:00
2008-07-21 15:16:10 -07:00
2009-09-23 06:46:35 -07:00
2008-10-17 14:40:53 -07:00
2010-05-20 13:21:41 -07:00
2010-05-20 13:21:42 -07:00