Julia Lawall 8f6bce3c4f PCI hotplug: 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: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-05-18 15:02:09 -07:00
..
2010-05-18 15:02:09 -07:00
2010-03-11 14:04:27 +01:00
2010-04-22 16:13:16 -07:00
2009-02-13 12:01:56 -08:00
2008-06-25 16:05:13 -07:00
2009-07-12 12:22:34 -07:00