Julia Lawall 5476b8b225 drivers/net/usb: 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: David S. Miller <davem@davemloft.net>
2010-05-17 17:44:48 -07:00
..
2010-05-17 17:44:47 -07:00
2010-05-17 17:44:48 -07:00
2010-05-10 05:01:31 -07:00
2010-04-27 18:12:04 -07:00
2010-05-17 17:44:47 -07:00
2010-05-17 17:44:47 -07:00
2010-03-07 15:25:51 -08:00
2009-05-01 15:27:02 -07:00