Commit 565ca886 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman

staging: line6: Fix unlocked snd_pcm_stop() call

commit 86f0b5b8 upstream.

snd_pcm_stop() must be called in the PCM substream lock context.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eeb57ebb
...@@ -378,8 +378,11 @@ static int snd_line6_pcm_free(struct snd_device *device) ...@@ -378,8 +378,11 @@ static int snd_line6_pcm_free(struct snd_device *device)
*/ */
static void pcm_disconnect_substream(struct snd_pcm_substream *substream) 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_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
snd_pcm_stream_unlock_irq(substream);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment