[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

@@ -302,11 +302,11 @@ static int switch_asic(struct echoaudio *chip, const struct firmware *asic)
/* Check to see if this is already loaded */
if (asic != chip->asic_code) {
monitors = kmalloc(MONITOR_ARRAY_SIZE, GFP_KERNEL);
monitors = kmemdup(chip->comm_page->monitors,
MONITOR_ARRAY_SIZE, GFP_KERNEL);
if (! monitors)
return -ENOMEM;
memcpy(monitors, chip->comm_page->monitors, MONITOR_ARRAY_SIZE);
memset(chip->comm_page->monitors, ECHOGAIN_MUTED,
MONITOR_ARRAY_SIZE);