diff options
author | Ajit Pandey <ajitp@codeaurora.org> | 2019-12-17 13:04:54 +0530 |
---|---|---|
committer | Ajit Pandey <ajitp@codeaurora.org> | 2019-12-17 18:09:25 +0530 |
commit | 9bd3522d04805db10f990b2c0b44642f4410922a (patch) | |
tree | 4e534a3a5433fdea81458953c8f3b3772d89cd89 | |
parent | a3640c08ea9cd079d2781f5bf2205215ff121abd (diff) | |
download | msm-extra-9bd3522d04805db10f990b2c0b44642f4410922a.tar.gz |
asoc: msm-compress: Add missing mutex initialization for pdata
Initialize mutex lock of pdata to avoid NULL pointer dereference
when the lock is used.
Change-Id: Ibe1ea524726cba8662b8f63683c752e5148071d6
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
-rw-r--r-- | asoc/msm-compress-q6-v2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/asoc/msm-compress-q6-v2.c b/asoc/msm-compress-q6-v2.c index b96d3b49..ec32c1ca 100644 --- a/asoc/msm-compress-q6-v2.c +++ b/asoc/msm-compress-q6-v2.c @@ -3982,6 +3982,7 @@ static int msm_compr_probe(struct snd_soc_platform *platform) if (!pdata) return -ENOMEM; + mutex_init(&pdata->lock); snd_soc_platform_set_drvdata(platform, pdata); for (i = 0; i < MSM_FRONTEND_DAI_MAX; i++) { |