diff options
author | Laxminath Kasam <lkasam@codeaurora.org> | 2016-02-24 15:40:46 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:02:42 -0700 |
commit | 3369208e899f91ac49c4c99682b11f0d0aada4a0 (patch) | |
tree | 19fb76491b27409f13bd842e3a599e71cb3288fc /sound/soc | |
parent | 8de5713e787815ac5ed51cde6b31afa54d11f68c (diff) |
ASoC: Initialize val to avoid access garbage value
In DAPM, when booting up widgets connect variable
is sometimes initialized with value 1 even though
expected to be 0. This is due to val not initialized
locally in API dapm_set_mixer_path_status and can
result in using garbage value.
CRs-Fixed: 982805
Change-Id: I172558f64c19750c461befda3aa16ca6480ab507
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-dapm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 76eeff8b4a5c..6d55ab029541 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -735,7 +735,7 @@ static void dapm_set_mixer_path_status(struct snd_soc_dapm_path *p, int i) unsigned int max = mc->max; unsigned int mask = (1 << fls(max)) - 1; unsigned int invert = mc->invert; - unsigned int val; + unsigned int val = 0; if (reg != SND_SOC_NOPM) { soc_dapm_read(p->sink->dapm, reg, &val); |