summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-01-08 23:09:11 +0100
committerAdrian Bunk <bunk@stusta.de>2007-01-09 03:23:35 +0100
commit748edb446a1b261da8ae5d46210f2ff7f7d345f9 (patch)
treeae1c36507c5c380ed496df67e01aedb40db8cea1 /sound
parentf701db35660a6017bef6d6e911d095bcf8b74010 (diff)
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: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 0c29679a8576..ebf68f126859 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -954,6 +954,7 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
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;