Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-block.git] / sound / pci / echoaudio / echoaudio.c
index b612a536a5a1724945be294824049d3a7cdb70bd..ca9125726be24bbba9252fc82873f6d0cf9f6e40 100644 (file)
@@ -2189,11 +2189,10 @@ static int snd_echo_resume(struct device *dev)
        u32 pipe_alloc_mask;
        int err;
 
-       commpage_bak = kmalloc(sizeof(*commpage), GFP_KERNEL);
+       commpage = chip->comm_page;
+       commpage_bak = kmemdup(commpage, sizeof(*commpage), GFP_KERNEL);
        if (commpage_bak == NULL)
                return -ENOMEM;
-       commpage = chip->comm_page;
-       memcpy(commpage_bak, commpage, sizeof(*commpage));
 
        err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device);
        if (err < 0) {