summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-06-02 12:08:37 +0200
committerTakashi Iwai <tiwai@suse.de>2010-06-02 12:08:37 +0200
commit21896bc010c17e5ac58951e771496ec2fb1051ed (patch)
tree2c20780540f5fffa5989857926188c15fd89d6c2 /sound
parentf07ff97b012ff9485618faeadcc9b1e5f72ceefa (diff)
downloadop-kernel-dev-21896bc010c17e5ac58951e771496ec2fb1051ed.zip
op-kernel-dev-21896bc010c17e5ac58951e771496ec2fb1051ed.tar.gz
ALSA: asihpi - Fix uninitialized variable
Initialize prev_ctl properly before reference: sound/pci/asihpi/asihpi.c: In function ‘snd_card_asihpi_mixer_new’: sound/pci/asihpi/asihpi.c:2568:30: warning: ‘prev_ctl.dst_node_index’ may be used uninitialized in this function Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/asihpi/asihpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index f74c737..1db586a 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -2578,6 +2578,9 @@ static int __devinit snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi)
if (err)
return -err;
+ memset(&prev_ctl, 0, sizeof(prev_ctl));
+ prev_ctl.control_type = -1;
+
for (idx = 0; idx < 2000; idx++) {
err = hpi_mixer_get_control_by_index(
ss, asihpi->h_mixer,
OpenPOWER on IntegriCloud