mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
[ALSA] Fix addition of user-defined boolean controls
Fixed the addition of user-defined boolean controls, the private data size is corrected to be handled properly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
parent
da43deb116
commit
ef35be7f52
1 changed files with 0 additions and 4 deletions
|
@ -1018,10 +1018,6 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
|
||||||
}
|
}
|
||||||
switch (info->type) {
|
switch (info->type) {
|
||||||
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
|
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
|
||||||
private_size = sizeof(char);
|
|
||||||
if (info->count > 128)
|
|
||||||
return -EINVAL;
|
|
||||||
break;
|
|
||||||
case SNDRV_CTL_ELEM_TYPE_INTEGER:
|
case SNDRV_CTL_ELEM_TYPE_INTEGER:
|
||||||
private_size = sizeof(long);
|
private_size = sizeof(long);
|
||||||
if (info->count > 128)
|
if (info->count > 128)
|
||||||
|
|
Loading…
Reference in a new issue