All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch] ASoC: sigmadsp: uninitialized variable in sigmadsp_activate_ctrl()
Date: Thu, 27 Nov 2014 01:35:16 +0300	[thread overview]
Message-ID: <20141126223516.GB443@mwanda> (raw)

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 <dan.carpenter@oracle.com>

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);
 

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch] ASoC: sigmadsp: uninitialized variable in sigmadsp_activate_ctrl()
Date: Wed, 26 Nov 2014 22:35:16 +0000	[thread overview]
Message-ID: <20141126223516.GB443@mwanda> (raw)

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 <dan.carpenter@oracle.com>

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);
 

             reply	other threads:[~2014-11-26 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 22:35 Dan Carpenter [this message]
2014-11-26 22:35 ` [patch] ASoC: sigmadsp: uninitialized variable in sigmadsp_activate_ctrl() Dan Carpenter
2014-11-27  8:09 ` Lars-Peter Clausen
2014-11-27  8:09   ` Lars-Peter Clausen
2014-11-27 10:59 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141126223516.GB443@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.