summaryrefslogtreecommitdiff
path: root/sound/usb/usbmidi.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-10-01 10:27:21 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 11:39:19 +0400
commit52978be636374c4bfb61220b37fa12f55a071c46 (patch)
tree36444be7bdbc0cdd99d903c0ad87316c93427517 /sound/usb/usbmidi.c
parent1a2f67b459bb7846d4a15924face63eb2683acc2 (diff)
downloadlinux-52978be636374c4bfb61220b37fa12f55a071c46.tar.xz
[PATCH] kmemdup: some users
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/usb/usbmidi.c')
-rw-r--r--sound/usb/usbmidi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index abe29dadd979..0dcf78adb99a 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -323,10 +323,9 @@ static int send_bulk_static_data(struct snd_usb_midi_out_endpoint* ep,
const void *data, int len)
{
int err;
- void *buf = kmalloc(len, GFP_KERNEL);
+ void *buf = kmemdup(data, len, GFP_KERNEL);
if (!buf)
return -ENOMEM;
- memcpy(buf, data, len);
dump_urb("sending", buf, len);
err = usb_bulk_msg(ep->umidi->chip->dev, ep->urb->pipe, buf, len,
NULL, 250);