summaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-02-17 15:30:27 +0100
committerTakashi Iwai <tiwai@suse.de>2020-02-17 15:30:32 +0100
commit2948f4a4e583a4d283a4b57b7b1101761daee5cc (patch)
tree4aba87e38659a58eb27c1d3ef2aba2da6d68bbe6 /sound/core/pcm_native.c
parent8dc5efe3d17cd572328ac4f1ebde629c83317f54 (diff)
parent60081b35c68ba6a466dee08de581be06999c930a (diff)
Merge branch 'topic/usb-uac2-effect-unit' into for-next
Merging the UAC2 effect unit parser improvement. As it's based on the previous usb-audio driver fix, it was deviated from for-next branch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 559633d4702d..8e1060b084f1 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2599,7 +2599,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream)
snd_pcm_drop(substream);
if (substream->hw_opened) {
- do_hw_free(substream);
+ if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN)
+ do_hw_free(substream);
substream->ops->close(substream);
substream->hw_opened = 0;
}