diff options
author | 2021-01-21 18:16:44 +0100 | |
---|---|---|
committer | 2021-01-21 18:14:19 +0000 | |
commit | 1d8fe0648e118fd495a2cb393a34eb8d428e7808 (patch) | |
tree | 8b73ed79d6bdcc8c5e1e4d195c126df97644eb09 | |
parent | ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete (diff) | |
download | linux-1d8fe0648e118fd495a2cb393a34eb8d428e7808.tar.gz linux-1d8fe0648e118fd495a2cb393a34eb8d428e7808.tar.bz2 linux-1d8fe0648e118fd495a2cb393a34eb8d428e7808.zip |
ASoC: Intel: Skylake: Zero snd_ctl_elem_value
Clear struct snd_ctl_elem_value before calling ->put() to avoid any data
leak.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210121171644.131059-2-ribalda@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/skylake/skl-topology.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 1ef30ca45410..b824086203b9 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -3632,7 +3632,7 @@ static void skl_tplg_complete(struct snd_soc_component *component) sprintf(chan_text, "c%d", mach->mach_params.dmic_num); for (i = 0; i < se->items; i++) { - struct snd_ctl_elem_value val; + struct snd_ctl_elem_value val = {}; if (strstr(texts[i], chan_text)) { val.value.enumerated.item[0] = i; |