diff options
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index b336797..9fefcaa 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -781,6 +781,11 @@ int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int * { unsigned int k; int changed = 0; + + if (!count) { + i->empty = 1; + return -EINVAL; + } for (k = 0; k < count; k++) { if (mask && !(mask & (1 << k))) continue; |