From 2e4ebea96992d741297cb2557dabbc8262322c60 Mon Sep 17 00:00:00 2001 From: Ajit Pandey Date: Fri, 25 Oct 2019 15:22:15 +0530 Subject: [PATCH] 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 --- asoc/msm-pcm-q6-v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asoc/msm-pcm-q6-v2.c b/asoc/msm-pcm-q6-v2.c index c9a51c013317..40acfe7e31dc 100644 --- a/asoc/msm-pcm-q6-v2.c +++ b/asoc/msm-pcm-q6-v2.c @@ -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] =