ASoC: Fix off-by-one bug in register cache size configuration
Subsystems (3)
PATCH 1/1 ASoC: Fix off-by-one bug in register cache size configuration
This is a simple off-by-one bug, the size of the register cache is incorrectly set to the maximum register index. Fix it by adding one.
Signed-off-by Dimitris Papastamos <[email protected]>
--- sound/soc/codecs/wm8962.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8962.c +1 -1
@@ -1780,7 +1780,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8962 = { .remove = wm8962_remove, .resume = wm8962_resume, .set_bias_level = wm8962_set_bias_level, - .reg_cache_size = WM8962_MAX_REGISTER, + .reg_cache_size = WM8962_MAX_REGISTER + 1, .reg_word_size = sizeof(u16), .reg_cache_default = wm8962_reg, .volatile_register = wm8962_volatile_register,
Signature · 1 line
1.7.2.3
Quoted 4 lines · Dimitris Papastamos
This is a simple off-by-one bug, the size of the register cache is incorrectly set to the maximum register index. Fix it by adding one.
Signed-off-by Dimitris Papastamos <[email protected]>
Acked-by Liam Girdwood <[email protected]>
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 4 lines · Dimitris Papastamos
This is a simple off-by-one bug, the size of the register cache is incorrectly set to the maximum register index. Fix it by adding one.
Signed-off-by Dimitris Papastamos <[email protected]>
Applied, thanks.