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-04-19 11:53:17 -07:00
2010-04-24 11:31:26 -07:00
2010-04-28 01:07:29 -06:00
2010-05-20 13:21:40 -07:00
2010-05-20 13:21:49 -07:00
2010-05-12 18:04:04 +03:00
2010-04-24 11:31:25 -07:00
2010-05-07 14:01:17 -07:00