ASoC: s6000: Fix unlocked snd_pcm_stop() call
authorTakashi Iwai <tiwai@suse.de>
Thu, 11 Jul 2013 16:00:25 +0000 (18:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 15 Jul 2013 19:25:14 +0000 (21:25 +0200)
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/s6000/s6000-pcm.c

index 1358c7d..d0740a7 100644 (file)
@@ -128,7 +128,9 @@ static irqreturn_t s6000_pcm_irq(int irq, void *data)
                    substream->runtime &&
                    snd_pcm_running(substream)) {
                        dev_dbg(pcm->dev, "xrun\n");
+                       snd_pcm_stream_lock(substream);
                        snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
+                       snd_pcm_stream_unlock(substream);
                        ret = IRQ_HANDLED;
                }