[PATCH] kmemdup: some users

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Alexey Dobriyan
2006-09-30 23:27:21 -07:00
committed by Linus Torvalds
parent 1a2f67b459
commit 52978be636
7 changed files with 13 additions and 22 deletions

View File

@@ -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);