From: Dimitris Papastamos Date: Fri, 10 Sep 2010 17:24:08 +0000 (+0100) Subject: ASoC: Fix off-by-one bug in WM8962 register cache size configuration X-Git-Tag: v2.6.37-rc1~82^2~8^2~108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6946e037ee9e94a560a931fdb2e3e66964216cfe;p=platform%2Fkernel%2Flinux-3.10.git ASoC: Fix off-by-one bug in WM8962 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 58ba2d3..30984dd 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -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,