[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1401631665-21470-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sun, 1 Jun 2014 16:07:45 +0200
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: [PATCH] sound: pci: ice1712: wm8776.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
sound/pci/ice1712/wm8776.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/ice1712/wm8776.c b/sound/pci/ice1712/wm8776.c
index e66c0da..52da0ff 100644
--- a/sound/pci/ice1712/wm8776.c
+++ b/sound/pci/ice1712/wm8776.c
@@ -510,7 +510,7 @@ static int snd_wm8776_ctl_get(struct snd_kcontrol *kcontrol,
{
struct snd_wm8776 *wm = snd_kcontrol_chip(kcontrol);
int n = kcontrol->private_value;
- u16 val1, val2;
+ u16 val1 = 0, val2 = 0;
if (wm->ctl[n].get)
wm->ctl[n].get(wm, &val1, &val2);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists