summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-09-25 11:49:01 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:22 -0700
commit566047d531c7853f5ed7d7638c4064aaf525b3b2 (patch)
tree69dc5bf7537bed52de159a23dea18f8f5637b9eb
parentedd5ef8326717b3d90f57daf565ff45fc7fddf99 (diff)
ALSA: Fix initiailization of user-space controls
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>
-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 bb397eaa7187..ac890d9c7ebb 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -997,6 +997,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;