]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Tue, 11 Jan 2011 11:24:02 +0000 (11:24 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 11 Jan 2011 18:27:08 +0000 (18:27 +0000)
The size of the lzo syncing bitmap was incorrectly set to the size
of the cache times the word size, however, the correct size is the
size of the cache.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-cache.c

index a9ebc078bea8fc21b56c22599688334e564ff5ae..8c2a21a978ac3551b2113b0640178f75ff8612ac 100644 (file)
@@ -1361,7 +1361,7 @@ static int snd_soc_lzo_cache_init(struct snd_soc_codec *codec)
                        goto err;
                }
                lzo_blocks[i]->sync_bmp = sync_bmp;
-               lzo_blocks[i]->sync_bmp_nbits = reg_size;
+               lzo_blocks[i]->sync_bmp_nbits = bmp_size;
                /* alloc the working space for the compressed block */
                ret = snd_soc_lzo_prepare(lzo_blocks[i]);
                if (ret < 0)