diff options
| author | Krzysztof Kozlowski <[email protected]> | 2023-10-03 15:54:22 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-10-09 12:14:20 +0000 |
| commit | 72151ad0cba8a07df90130ff62c979520d71f23b (patch) | |
| tree | e65dc140ead73c5c64516c245b82e3d9bd1feffc /sound/soc/codecs/lpass-wsa-macro.c | |
| parent | ASoC: qcom: reduce number of binding headers includes (diff) | |
| download | kernel-72151ad0cba8a07df90130ff62c979520d71f23b.tar.gz kernel-72151ad0cba8a07df90130ff62c979520d71f23b.zip | |
ASoC: codecs: wsa-macro: fix uninitialized stack variables with name prefix
Driver compares widget name in wsa_macro_spk_boost_event() widget event
callback, however it does not handle component's name prefix. This
leads to using uninitialized stack variables as registers and register
values. Handle gracefully such case.
Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
Cc: [email protected]
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/codecs/lpass-wsa-macro.c')
| -rw-r--r-- | sound/soc/codecs/lpass-wsa-macro.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index ec6859ec0d38..ea6e3fa7e9e1 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -1685,6 +1685,9 @@ static int wsa_macro_spk_boost_event(struct snd_soc_dapm_widget *w, boost_path_cfg1 = CDC_WSA_RX1_RX_PATH_CFG1; reg = CDC_WSA_RX1_RX_PATH_CTL; reg_mix = CDC_WSA_RX1_RX_PATH_MIX_CTL; + } else { + dev_warn(component->dev, "Incorrect widget name in the driver\n"); + return -EINVAL; } switch (event) { |
