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>
This commit is contained in:
committed by
Adrian Bunk
parent
f701db3566
commit
748edb446a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user