Skip to content
Commit b284362b authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: cs42l51: Fix off-by-one for reg_cache_size



Just checking the code in cs42l51_fill_cache():
The cache pointer points to codec->reg_cache + 1.
I think it is because CS42L51_FIRSTREG is 0x01,
so codec->reg_cache[0] is not used here.

Then we read CS42L51_NUMREGS bytes to cache.
So we need reg_cache_size to be CS42L51_NUMREGS + 1.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 4ca8af57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment