ASoC: WCD9310: Fix issue with ANC firmware parsing
Incorrect parsing of ANC firmware can lead to DAPM
failing to successfully enable ANC, which can cause
a kernel panic.
Signed-off-by: Brad Rubin <brubin@codeaurora.org>
diff --git a/sound/soc/codecs/wcd9310.c b/sound/soc/codecs/wcd9310.c
index 40ea0d4..516e425 100644
--- a/sound/soc/codecs/wcd9310.c
+++ b/sound/soc/codecs/wcd9310.c
@@ -760,8 +760,7 @@
anc_size_remaining -= (anc_writes_size *
TABLA_PACKED_REG_SIZE);
- anc_ptr += (anc_writes_size *
- TABLA_PACKED_REG_SIZE);
+ anc_ptr += anc_writes_size;
}
if (i == num_anc_slots) {
dev_err(codec->dev, "Selected ANC slot not present\n");