diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-11 18:02:38 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-08-02 22:14:59 +0200 |
commit | 4bcfe68e7e4db75b1ec8d3668f04c435ff98b809 (patch) | |
tree | 400b65252cd20cf105a0fd2e81274c24b1a3fea8 | |
parent | 8ac7e3f3ac405c3cc4feee6a09b9b2899ec61aea (diff) |
staging: line6: Fix unlocked snd_pcm_stop() call
commit 86f0b5b86d142b9323432fef078a6cf0fb5dda74 upstream.
snd_pcm_stop() must be called in the PCM substream lock context.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/staging/line6/pcm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index 9d4c8a606eea..2d3a420d6038 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -360,8 +360,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); + } } /* |