mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
ASoC: codecs: rx-macro: fix accessing compander for aux
[ Upstream commit42c709c4e1
] AUX interpolator does not have compander, so check before accessing compander data for this. Without this checkan array of out bounds access will be made in comp_enabled[] array. Fixes:4f692926f5
("ASoC: codecs: lpass-rx-macro: add dapm widgets and route") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220222183212.11580-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f77b2123d2
commit
6aa8ef9535
1 changed files with 4 additions and 0 deletions
|
@ -2039,6 +2039,10 @@ static int rx_macro_load_compander_coeff(struct snd_soc_component *component,
|
|||
int i;
|
||||
int hph_pwr_mode;
|
||||
|
||||
/* AUX does not have compander */
|
||||
if (comp == INTERP_AUX)
|
||||
return 0;
|
||||
|
||||
if (!rx->comp_enabled[comp])
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue