Skip to content

Commit

Permalink
staging: line6: Fix unlocked snd_pcm_stop() call
Browse files Browse the repository at this point in the history
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 15, 2013
1 parent e6355ad commit 86f0b5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/staging/line6/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,11 @@ static int snd_line6_pcm_free(struct snd_device *device)
*/
static void pcm_disconnect_substream(struct snd_pcm_substream *substream)
{
if (substream->runtime && snd_pcm_running(substream))
if (substream->runtime && snd_pcm_running(substream)) {
snd_pcm_stream_lock_irq(substream);
snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
snd_pcm_stream_unlock_irq(substream);
}
}

/*
Expand Down

0 comments on commit 86f0b5b

Please sign in to comment.