Merge tag 'jfs-4.9' of git://github.com/kleikamp/linux-shaggy
[cascardo/linux.git] / sound / core / pcm_lib.c
index 3a9b66c..bb12615 100644 (file)
@@ -1886,8 +1886,8 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
                snd_timer_interrupt(substream->timer, 1);
 #endif
  _end:
-       snd_pcm_stream_unlock_irqrestore(substream, flags);
        kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
+       snd_pcm_stream_unlock_irqrestore(substream, flags);
 }
 
 EXPORT_SYMBOL(snd_pcm_period_elapsed);
@@ -2595,6 +2595,8 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
        };
        int err;
 
+       if (WARN_ON(pcm->streams[stream].chmap_kctl))
+               return -EBUSY;
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;