diff options
author | Daniel Baluta <daniel.baluta@nxp.com> | 2018-11-08 16:13:12 +0200 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:52:12 +0800 |
commit | f5f13e4c2c78efb8dda749aeedbc4b51ee9694ee (patch) | |
tree | 613fb13e3eb0c6fabc89b479c98d8943ced93578 /sound/soc/fsl/fsl_dsp_proxy.c | |
parent | 13bc9cfb13def83d394bb6ca7a8fbcdbf0f00f44 (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.c | 2 |
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; } |