diff options
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r-- | sound/usb/stream.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 2f6d39c2ba7c..bf88933acc4f 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c | |||
@@ -67,9 +67,13 @@ static void snd_usb_audio_stream_free(struct snd_usb_stream *stream) | |||
67 | static void snd_usb_audio_pcm_free(struct snd_pcm *pcm) | 67 | static void snd_usb_audio_pcm_free(struct snd_pcm *pcm) |
68 | { | 68 | { |
69 | struct snd_usb_stream *stream = pcm->private_data; | 69 | struct snd_usb_stream *stream = pcm->private_data; |
70 | struct snd_usb_audio *chip; | ||
70 | if (stream) { | 71 | if (stream) { |
72 | mutex_lock(&stream->chip->dev_lock); | ||
73 | chip = stream->chip; | ||
71 | stream->pcm = NULL; | 74 | stream->pcm = NULL; |
72 | snd_usb_audio_stream_free(stream); | 75 | snd_usb_audio_stream_free(stream); |
76 | mutex_unlock(&chip->dev_lock); | ||
73 | } | 77 | } |
74 | } | 78 | } |
75 | 79 | ||