Skip to content

Commit 43e9dc7

Browse files
committed
ASoC: wm8962: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the arrays. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
1 parent 740fb9d commit 43e9dc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎sound/soc/codecs/wm8962.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ static int wm8962_reset(struct snd_soc_codec *codec)
19731973
static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0);
19741974
static const DECLARE_TLV_DB_SCALE(mixin_tlv, -1500, 300, 0);
19751975
static const unsigned int mixinpga_tlv[] = {
1976-
TLV_DB_RANGE_HEAD(7),
1976+
TLV_DB_RANGE_HEAD(5),
19771977
0, 1, TLV_DB_SCALE_ITEM(0, 600, 0),
19781978
2, 2, TLV_DB_SCALE_ITEM(1300, 1300, 0),
19791979
3, 4, TLV_DB_SCALE_ITEM(1800, 200, 0),
@@ -1988,7 +1988,7 @@ static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
19881988
static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
19891989
static const DECLARE_TLV_DB_SCALE(hp_tlv, -700, 100, 0);
19901990
static const unsigned int classd_tlv[] = {
1991-
TLV_DB_RANGE_HEAD(7),
1991+
TLV_DB_RANGE_HEAD(2),
19921992
0, 6, TLV_DB_SCALE_ITEM(0, 150, 0),
19931993
7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0),
19941994
};

0 commit comments

Comments
 (0)