From: Takashi Iwai Date: Thu, 16 Sep 2010 20:52:32 +0000 (+0200) Subject: ALSA: pcm - Fix unbalanced pm_qos_request X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8699a0b657b43fa6401537dfe345bee7aa8115ec;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 134fc6c2e08..d4eb2ef8078 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) substream->ops->close(substream); substream->hw_opened = 0; } + if (pm_qos_request_active(&substream->latency_pm_qos_req)) + pm_qos_remove_request(&substream->latency_pm_qos_req); if (substream->pcm_release) { substream->pcm_release(substream); substream->pcm_release = NULL;