diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-15 23:15:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 13:21:49 -0700 |
commit | 4b8e12336fede9e30b6140e840431161d46cf677 (patch) | |
tree | 54242b26f4c80b497904c925842cb56a6c69c0a2 /drivers/usb/serial/usb_debug.c | |
parent | USB: CP210x New Device IDs 11 New device IDs (diff) | |
download | linux-dev-4b8e12336fede9e30b6140e840431161d46cf677.tar.xz linux-dev-4b8e12336fede9e30b6140e840431161d46cf677.zip |
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>
Diffstat (limited to 'drivers/usb/serial/usb_debug.c')
0 files changed, 0 insertions, 0 deletions