Skip to content

Commit

Permalink
ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_s…
Browse files Browse the repository at this point in the history
…ync()

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>
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Jan 11, 2011
1 parent f4fd58d commit 04f8fd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 04f8fd1

Please sign in to comment.