summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_dsp.c
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2018-11-08 14:40:50 +0200
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:52:08 +0800
commit20a12565f1e2e8899ed046025a2da1dd6e6f4ed3 (patch)
tree14e7f188b772e05a3129d99e92ab554848ab6d8a /sound/soc/fsl/fsl_dsp.c
parentfc803f2425607fc71ae513df55e0e185d45c4e8b (diff)
MLK-20189-1: ASoC: fsl: dsp: Unlock proxy->lock on error path
xf_cmd_recv will return with lock taken in two cases: * msg was received * waiting for msg was interrupted by a signal Make sure we unlock proxy->lock in both cases. This fixes Coverity issue: CID3335482. 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.c')
-rw-r--r--sound/soc/fsl/fsl_dsp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_dsp.c b/sound/soc/fsl/fsl_dsp.c
index 629947f65ca8..f303a73df282 100644
--- a/sound/soc/fsl/fsl_dsp.c
+++ b/sound/soc/fsl/fsl_dsp.c
@@ -231,6 +231,7 @@ static int fsl_dsp_ipc_msg_from_dsp(struct xf_client *client,
m = xf_cmd_recv(&dsp_priv->proxy, &client->wait, &client->queue, 0);
if (IS_ERR(m)) {
+ xf_unlock(&dsp_priv->proxy.lock);
dev_err(dev, "receiving failed: %d", (int)PTR_ERR(m));
return PTR_ERR(m);
}