X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fechoaudio%2Flayla24_dsp.c;fp=sound%2Fpci%2Fechoaudio%2Flayla24_dsp.c;h=97e42e1151476cdafbb40ac83a6d09b2798bd704;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=7ec5b63d0dcec008b0a7200ca5d57cef4ae42438;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/sound/pci/echoaudio/layla24_dsp.c b/sound/pci/echoaudio/layla24_dsp.c index 7ec5b63d0..97e42e115 100644 --- a/sound/pci/echoaudio/layla24_dsp.c +++ b/sound/pci/echoaudio/layla24_dsp.c @@ -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);