]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: Fix initiailization of user-space controls
authorTakashi Iwai <tiwai@suse.de>
Mon, 25 Sep 2006 09:49:01 +0000 (11:49 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 20:23:22 +0000 (13:23 -0700)
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

index bb397eaa718793cb977687628eed02a9d4477907..ac890d9c7ebb8dcbb606cf553d13606b5ff39edc 100644 (file)
@@ -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;