Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a948b056 authored by Aditya Bavanari's avatar Aditya Bavanari Committed by Gerrit - the friendly Code Review server
Browse files

ALSA: pcm: Remove qos request only when it is active



Remove pm qos request for latency_pm_qos_request
only when it is active as it might lead to list corruption
in pm driver if removal is already done.

Change-Id: Ia9b5e933b217e2d988f18ae61673228b54e388bc
Signed-off-by: default avatarAditya Bavanari <abavanar@codeaurora.org>
parent 0b0d6989
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -817,6 +817,7 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
	if (substream->ops->hw_free)
		result = substream->ops->hw_free(substream);
	snd_pcm_set_state(substream, SNDRV_PCM_STATE_OPEN);
	if (pm_qos_request_active(&substream->latency_pm_qos_req))
		pm_qos_remove_request(&substream->latency_pm_qos_req);
	return result;
}