summaryrefslogtreecommitdiffstats
path: root/kernel/user.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-15 23:15:44 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:49 -0700
commit4b8e12336fede9e30b6140e840431161d46cf677 (patch)
tree54242b26f4c80b497904c925842cb56a6c69c0a2 /kernel/user.c
parenteefd9029fde4d90d59804eeb54880ab8db5c1866 (diff)
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 'kernel/user.c')
0 files changed, 0 insertions, 0 deletions