diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index fd3926fb0a08..e8de831f98bc 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -2259,6 +2259,9 @@ static int snd_asihpi_cmode_info(struct snd_kcontrol *kcontrol, | |||
2259 | valid_modes++; | 2259 | valid_modes++; |
2260 | } | 2260 | } |
2261 | 2261 | ||
2262 | if (!valid_modes) | ||
2263 | return -EINVAL; | ||
2264 | |||
2262 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 2265 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
2263 | uinfo->count = 1; | 2266 | uinfo->count = 1; |
2264 | uinfo->value.enumerated.items = valid_modes; | 2267 | uinfo->value.enumerated.items = valid_modes; |