diff options
-rw-r--r-- | sound/soc/fsl/fsl_rpmsg_i2s.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_rpmsg_i2s.c b/sound/soc/fsl/fsl_rpmsg_i2s.c index 95cbe455392b..60b872f091a1 100644 --- a/sound/soc/fsl/fsl_rpmsg_i2s.c +++ b/sound/soc/fsl/fsl_rpmsg_i2s.c @@ -35,15 +35,15 @@ static int i2s_send_message(struct i2s_rpmsg_s *msg, { int err; + mutex_lock(&info->tx_lock); if (!info->rpdev) { dev_dbg(info->dev, "rpmsg channel not ready, m4 image ready?\n"); + mutex_unlock(&info->tx_lock); return -EINVAL; } dev_dbg(&info->rpdev->dev, "send cmd %d\n", msg->header.cmd); - mutex_lock(&info->tx_lock); - reinit_completion(&info->cmd_complete); err = rpmsg_send(info->rpdev->ept, (void *)msg, sizeof(struct i2s_rpmsg_s)); |