Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29af16f3 authored by Laxminath Kasam's avatar Laxminath Kasam Committed by Banajit Goswami
Browse files

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: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent ffbda0f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);