diff options
| author | Jhansi Konathala <cjkonat@codeaurora.org> | 2019-11-29 18:33:49 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-01-10 05:12:34 -0800 |
| commit | 6d644704248525d51f3551372dc1d6a82535be78 (patch) | |
| tree | 10fb393ae341e2d4c84fafc58d86cff454d257ba | |
| parent | 80cdbd88098f76190a9837c20a89bc6ad3c63403 (diff) | |
asoc: msm-compress: Replace goto with return in case of invalid value
In case of invalid values in _put() callback return directly to avoid
deadlock issue with mutex unlocking in goto label.
Change-Id: Ib0623e26dd83b96cd6ec315f515098b8ea0b2dd2
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Jhansi Konathala <cjkonat@codeaurora.org>
| -rw-r--r-- | sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c index 10976bf8f94b..7a2c50c28e77 100644 --- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c @@ -3519,8 +3519,7 @@ static int msm_compr_dec_params_put(struct snd_kcontrol *kcontrol, if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %lu\n", __func__, fe_id); - rc = -EINVAL; - goto end; + return -EINVAL; } cstream = pdata->cstream[fe_id]; @@ -3528,14 +3527,12 @@ static int msm_compr_dec_params_put(struct snd_kcontrol *kcontrol, if (!cstream || !dec_params) { pr_err("%s: stream or dec_params inactive\n", __func__); - rc = -EINVAL; - goto end; + return -EINVAL; } prtd = cstream->runtime->private_data; if (!prtd) { pr_err("%s: cannot set dec_params\n", __func__); - rc = -EINVAL; - goto end; + return -EINVAL; } mutex_lock(&pdata->lock); |
