[ALSA] soc - 0.13 ASoC DAPM bug fix for unnamed streams
[powerpc.git] / sound / core / pcm_lib.c
index b336797..9fefcaa 100644 (file)
@@ -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;