summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/usb_debug.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-16 01:15:44 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 00:21:49 +0400
commit4b8e12336fede9e30b6140e840431161d46cf677 (patch)
tree54242b26f4c80b497904c925842cb56a6c69c0a2 /drivers/usb/serial/usb_debug.c
parenteefd9029fde4d90d59804eeb54880ab8db5c1866 (diff)
downloadlinux-4b8e12336fede9e30b6140e840431161d46cf677.tar.xz
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