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

Skip to content
Commit d0c55d4e authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati Committed by Stephen Boyd
Browse files

ASoC: msm: Avoid accessing invalid audio client during hw_params fail



In some cases, when DSP doesn't respond to any commands that
are sent, pcm_open will return success followed by hw_params
which will return failure. Audio client gets freed in case of
hw_params failure. However, the subsequent pcm_close will try to
access the audio client structure which is already freed. To avoid
this case, we move open_write to msm_pcm_open so that if DSP is in
bad state, pcm_open will return failure, thus avoiding pcm_close
to happen.

Change-Id: Ia53408e8c0a1d40ed552ba81340e3766451c69f1
Signed-off-by: default avatarPhani Kumar Uppalapati <phanik@codeaurora.org>
parent 826d43de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment