From patchwork Wed Nov 16 13:08:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 9432113 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2753C60471 for ; Wed, 16 Nov 2016 16:35:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 186CE2880B for ; Wed, 16 Nov 2016 16:35:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D23D28D8E; Wed, 16 Nov 2016 16:35:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4312B2880B for ; Wed, 16 Nov 2016 16:34:59 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 02836266D48; Wed, 16 Nov 2016 17:34:58 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 16E57266D5D; Wed, 16 Nov 2016 17:32:33 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BB2BE26689C; Wed, 16 Nov 2016 14:10:25 +0100 (CET) Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by alsa0.perex.cz (Postfix) with ESMTP id 024A22606F8 for ; Wed, 16 Nov 2016 14:10:23 +0100 (CET) Received: by mail-pg0-f66.google.com with SMTP id p66so14724525pga.2 for ; Wed, 16 Nov 2016 05:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Ztvt542RhUYAXZ+q0MC/T8/dw0AdvbVtYa4TzStmsLE=; b=llbjGXx8CVUas8RdLbc8b2rGWvBLNfv3FCqV1+G3Eip+p2GfzgL/XNpy0ZNBGUJKIb /1SelpADY+1AaxgjXWAIa7oKgDJSENi9oAcx7JpOWDA0iFj4rgTPubu9HzDrLnCptnnC TSdy9xd3Fu8Qm8etjyHzxXtoDdqfJ9/IVs7jV1wUtkSDpzJ0I4l405ulodeXVu0zZR3c rXPXICKGmolgRs/W5fKZreQCDVkIOrDIin3o+TEJ1qK9Ry3sbk4qK+fD3CTxeZfEKMx/ FTTeqip/LMihOjv/t68Vrx3Q2D7zJIOaa0DsMUHiiL/xvajTRZ+lYEJ6O6GXSI/hgUbn cUWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ztvt542RhUYAXZ+q0MC/T8/dw0AdvbVtYa4TzStmsLE=; b=Z0phTzJqLZdtFwrRIRl4ZVJHUTczkdsL2k5Wi9pBJwTeDhXJ+l+mrjzGOrvQ/73y/b xIYWCQcendhLf0uKTK+QELG7H99v/8kppxA4++hC33oZkrMkuqXAb3E6SM3tjAeQ2Oi4 XyLdWX4V9tIYLwZ1EFWRb740nlOvJSVjKkCLCwmLNxqcApZ6UAywjOI7Id5yrmkUkGOb 2ZjR75EIjI6FRUgyv9nhyxYnJi1zTH6+Tv0qsm68TVR/z9zWbI26wV9KfigVefioVNsx Fl5BbZ4wSqERTYOXKv5Xu0GfI2TwsxG715xYjG1sy5F+fI5AtR1nVUhSgGIM3CZNE2NC WaSQ== X-Gm-Message-State: ABUngvdroGegxqdtlg4lO1L5TAWKOojLoOASFOGYdX5YetL9wMVjxKHnrQMjyoZ4dQsblw== X-Received: by 10.98.94.129 with SMTP id s123mr4302804pfb.37.1479301822554; Wed, 16 Nov 2016 05:10:22 -0800 (PST) Received: from localhost.localdomain (218-164-96-111.dynamic.hinet.net. [218.164.96.111]) by smtp.gmail.com with ESMTPSA id y29sm53829494pfd.63.2016.11.16.05.10.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 05:10:21 -0800 (PST) From: Axel Lin To: Mark Brown Date: Wed, 16 Nov 2016 21:08:41 +0800 Message-Id: <20161116130842.28182-1-axel.lin@ingics.com> X-Mailer: git-send-email 2.9.3 Cc: Oder Chiou , alsa-devel@alsa-project.org, Axel Lin , Liam Girdwood , Julia Lawall , Bard Liao Subject: [alsa-devel] [PATCH 1/2] ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Reported-by: Julia Lawall Signed-off-by: Axel Lin --- sound/soc/codecs/rt5665.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c index 34254fd..7dfaaf1 100644 --- a/sound/soc/codecs/rt5665.c +++ b/sound/soc/codecs/rt5665.c @@ -4587,7 +4587,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) pr_err("HP Calibration Failure\n"); regmap_write(rt5665->regmap, RT5665_RESET, 0); regcache_cache_bypass(rt5665->regmap, false); - return; + goto out_unlock; } count++; @@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) pr_err("MONO Calibration Failure\n"); regmap_write(rt5665->regmap, RT5665_RESET, 0); regcache_cache_bypass(rt5665->regmap, false); - return; + goto out_unlock; } count++; @@ -4621,6 +4621,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602); regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120); +out_unlock: mutex_unlock(&rt5665->calibrate_mutex); }