summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_dsp_proxy.c
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2018-11-08 16:13:12 +0200
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:52:12 +0800
commitf5f13e4c2c78efb8dda749aeedbc4b51ee9694ee (patch)
tree613fb13e3eb0c6fabc89b479c98d8943ced93578 /sound/soc/fsl/fsl_dsp_proxy.c
parent13bc9cfb13def83d394bb6ca7a8fbcdbf0f00f44 (diff)
MLK-20189-5: ASoC: fsl: dsp_proxy: Unlock proxy->lock on error path
xf_cmd_send_recv returns with lock taken if waiting was interrupted by a signal. This fixes Coverity issues: CID5233120 / CID5233060 Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com> Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_proxy.c')
-rw-r--r--sound/soc/fsl/fsl_dsp_proxy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_dsp_proxy.c b/sound/soc/fsl/fsl_dsp_proxy.c
index 94bffc06c608..f29b6ecaacbb 100644
--- a/sound/soc/fsl/fsl_dsp_proxy.c
+++ b/sound/soc/fsl/fsl_dsp_proxy.c
@@ -678,6 +678,7 @@ int xf_cmd_alloc(struct xf_proxy *proxy, void **buffer, u32 length)
/* ...send command to remote proxy */
m = xf_cmd_send_recv(proxy, id, XF_ALLOC, NULL, length);
if (IS_ERR(m)) {
+ xf_unlock(&proxy->lock);
ret = PTR_ERR(m);
return ret;
}
@@ -707,6 +708,7 @@ int xf_cmd_free(struct xf_proxy *proxy, void *buffer, u32 length)
/* ...synchronously execute freeing command */
m = xf_cmd_send_recv(proxy, id, XF_FREE, buffer, length);
if (IS_ERR(m)) {
+ xf_unlock(&proxy->lock);
ret = PTR_ERR(m);
return ret;
}