[media] media: usb: cpia2: Use kmemdup instead of kmalloc and memcpy
authorShyam Saini <mayhs11saini@gmail.com>
Fri, 23 Dec 2016 19:34:36 +0000 (17:34 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 09:46:34 +0000 (07:46 -0200)
commit9945cf9997b5fc10b47c010cdb40b2753ccc77d9
tree07890aae81e61363158a1f1e85af7cf1d248edb8
parent01faa0d9c79e9c6a52d33e01f953588a946e3d87
[media] media: usb: cpia2: Use kmemdup instead of kmalloc and memcpy

When some other buffer is immediately copied into allocated region.
Replace calls to kmalloc followed by a memcpy with a direct
call to kmemdup.

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/cpia2/cpia2_usb.c