asoc: msm-pcm: Fix deadlock with error case in latency_ctl_get()

Mutex lock happened  two times without unlock,which created
deadlock. Change mutex_lock() to mutex_unlock() to fix it.

Change-Id: I3731bdb202a664c3dbaea74f90dbea487350c804
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
This commit is contained in:
Ajit Pandey
2019-10-25 15:22:15 +05:30
committed by Gerrit - the friendly Code Review server
parent 1f384e85ad
commit 2e4ebea969

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1942,7 +1942,7 @@ static int msm_pcm_path_latency_ctl_get(struct snd_kcontrol *kcontrol,
if (rc) {
pr_err("%s: get_path_delay failed, ret=%d\n",
__func__, rc);
mutex_lock(&pdata->lock);
mutex_unlock(&pdata->lock);
return -EINVAL;
}
ucontrol->value.integer.value[0] =