Merge branch 'for-linus' into for-next
[linux-2.6-microblaze.git] / sound / usb / stream.c
index 7f58c76..ee9aa1d 100644 (file)
@@ -192,16 +192,16 @@ static int usb_chmap_ctl_get(struct snd_kcontrol *kcontrol,
        struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);
        struct snd_usb_substream *subs = info->private_data;
        struct snd_pcm_chmap_elem *chmap = NULL;
-       int i;
+       int i = 0;
 
-       memset(ucontrol->value.integer.value, 0,
-              sizeof(ucontrol->value.integer.value));
        if (subs->cur_audiofmt)
                chmap = subs->cur_audiofmt->chmap;
        if (chmap) {
                for (i = 0; i < chmap->channels; i++)
                        ucontrol->value.integer.value[i] = chmap->map[i];
        }
+       for (; i < subs->channels_max; i++)
+               ucontrol->value.integer.value[i] = 0;
        return 0;
 }