projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ceaec1
)
[media] pwc: Use kmemdup rather than duplicating its implementation
author
Thomas Meyer
<thomas@m3y3r.de>
Thu, 17 Nov 2011 21:43:40 +0000
(18:43 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Thu, 24 Nov 2011 23:08:16 +0000
(21:08 -0200)
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pwc/pwc-ctrl.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/media/video/pwc/pwc-ctrl.c
b/drivers/media/video/pwc/pwc-ctrl.c
index 3977addf3ba8553d586bfb0a3b8521e146435e7e..b42c239de9cf86b72c29450e5a1758696b5a1e0b 100644
(file)
--- a/
drivers/media/video/pwc/pwc-ctrl.c
+++ b/
drivers/media/video/pwc/pwc-ctrl.c
@@
-113,10
+113,9
@@
static int _send_control_msg(struct pwc_device *pdev,
void *kbuf = NULL;
if (buflen) {
- kbuf = km
alloc(
buflen, GFP_KERNEL); /* not allowed on stack */
+ kbuf = km
emdup(buf,
buflen, GFP_KERNEL); /* not allowed on stack */
if (kbuf == NULL)
return -ENOMEM;
- memcpy(kbuf, buf, buflen);
}
rc = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),