From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] ASoC: sigmadsp: uninitialized variable in sigmadsp_activate_ctrl() Date: Thu, 27 Nov 2014 01:35:16 +0300 Message-ID: <20141126223516.GB443@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline Sender: kernel-janitors-owner@vger.kernel.org To: Lars-Peter Clausen Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org List-Id: alsa-devel@alsa-project.org The "changed" variable should be set to false at the start. Fixes: a35daac77a03 ('ASoC: sigmadsp: Add support for fw v2') Signed-off-by: Dan Carpenter diff --git a/sound/soc/codecs/sigmadsp.c b/sound/soc/codecs/sigmadsp.c index 34fdc40..d53680a 100644 --- a/sound/soc/codecs/sigmadsp.c +++ b/sound/soc/codecs/sigmadsp.c @@ -661,7 +661,8 @@ static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp, struct snd_card *card = sigmadsp->component->card->snd_card; struct snd_kcontrol_volatile *vd; struct snd_ctl_elem_id id; - bool active, changed; + bool active; + bool changed = false; active = sigmadsp_samplerate_valid(ctrl->samplerates, samplerate_mask); From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Wed, 26 Nov 2014 22:35:16 +0000 Subject: [patch] ASoC: sigmadsp: uninitialized variable in sigmadsp_activate_ctrl() Message-Id: <20141126223516.GB443@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Lars-Peter Clausen Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org The "changed" variable should be set to false at the start. Fixes: a35daac77a03 ('ASoC: sigmadsp: Add support for fw v2') Signed-off-by: Dan Carpenter diff --git a/sound/soc/codecs/sigmadsp.c b/sound/soc/codecs/sigmadsp.c index 34fdc40..d53680a 100644 --- a/sound/soc/codecs/sigmadsp.c +++ b/sound/soc/codecs/sigmadsp.c @@ -661,7 +661,8 @@ static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp, struct snd_card *card = sigmadsp->component->card->snd_card; struct snd_kcontrol_volatile *vd; struct snd_ctl_elem_id id; - bool active, changed; + bool active; + bool changed = false; active = sigmadsp_samplerate_valid(ctrl->samplerates, samplerate_mask);