[patch 15/67] ALSA: Fix initiailization of user-space controls

Greg KH
2006-10-11T21:05:52Z

[-- Attachment #1: alsa-fix-initiailization-of-user-space-controls.patch --]
[-- Type: text/plain, Size: 891 bytes --]

-stable review patch. If anyone has any objections, please let us know.

------------------
From: Takashi Iwai <tiwai@suse.de>

ALSA: Fix initiailization of user-space controls

Fix an assertion when accessing a user-defined control due to lack of
initialization (appears only when CONFIG_SND_DEBUg is enabled).

ALSA sound/core/control.c:660: BUG? (info->access == 0)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
sound/core/control.c | 1 +
1 file changed, 1 insertion(+)

--- linux-2.6.18.orig/sound/core/control.c
+++ linux-2.6.18/sound/core/control.c
@@ -997,6 +997,7 @@ static int snd_ctl_elem_add(struct snd_c
if (ue == NULL)
return -ENOMEM;
ue->info = *info;
+ ue->info.access = 0;
ue->elem_data = (char *)ue + sizeof(*ue);
ue->elem_data_size = private_size;
kctl.private_free = snd_ctl_elem_user_free;

--