diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-16 16:52:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-16 17:04:38 -0400 |
commit | 8699a0b657b43fa6401537dfe345bee7aa8115ec (patch) | |
tree | 109968539c7622c5ebda6dcac7bb4df3a8b6350d /sound | |
parent | 147fcf1c211f1a87bf4d0711b7e9637f3d6ce080 (diff) |
ALSA: pcm - Fix unbalanced pm_qos_request
The pm_qos_request isn't freed properly when OSS PCM emulation is used
because it skips snd_pcm_hw_free() call but directly releases the
stream. This resulted in Oops later.
Tested-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_native.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 134fc6c2e08d..d4eb2ef80784 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -1992,6 +1992,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream) | |||
1992 | substream->ops->close(substream); | 1992 | substream->ops->close(substream); |
1993 | substream->hw_opened = 0; | 1993 | substream->hw_opened = 0; |
1994 | } | 1994 | } |
1995 | if (pm_qos_request_active(&substream->latency_pm_qos_req)) | ||
1996 | pm_qos_remove_request(&substream->latency_pm_qos_req); | ||
1995 | if (substream->pcm_release) { | 1997 | if (substream->pcm_release) { |
1996 | substream->pcm_release(substream); | 1998 | substream->pcm_release(substream); |
1997 | substream->pcm_release = NULL; | 1999 | substream->pcm_release = NULL; |