From 748edb446a1b261da8ae5d46210f2ff7f7d345f9 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 8 Jan 2007 23:09:11 +0100 Subject: 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 Signed-off-by: Adrian Bunk --- sound/core/control.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3