summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-22 10:22:49 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-05-22 12:49:37 +0200
commitdf1f1d1cb43b4ffdef5ba5f0623e2f73e94ce030 (patch)
treefdef68b0b5230b9f49f7b26eee33aee4e4f042e3 /sound/soc
parentdocbook: make mtd nand module init static (diff)
downloadlinux-df1f1d1cb43b4ffdef5ba5f0623e2f73e94ce030.tar.xz
linux-df1f1d1cb43b4ffdef5ba5f0623e2f73e94ce030.zip
drivers/mtd: Use memdup_user
Use memdup_user when user data is immediately copied into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'sound/soc')
0 files changed, 0 insertions, 0 deletions