From patchwork Sun Nov 2 06:34:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5211091 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BE385C11AC for ; Sun, 2 Nov 2014 06:35:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 162A8201CD for ; Sun, 2 Nov 2014 06:35:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C09B72017E for ; Sun, 2 Nov 2014 06:35:18 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 61CBC2608F2; Sun, 2 Nov 2014 07:35:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 23D75260534; Sun, 2 Nov 2014 07:35:06 +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 3F285260535; Sun, 2 Nov 2014 07:35:04 +0100 (CET) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by alsa0.perex.cz (Postfix) with ESMTP id E1973260532 for ; Sun, 2 Nov 2014 07:34:55 +0100 (CET) Received: by mail-pd0-f171.google.com with SMTP id r10so9699468pdi.30 for ; Sat, 01 Nov 2014 23:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=akpHqMWnqIRXAL3GCvYcXxYuPSS2U2y9iNx7nVgSfPg=; b=jlg7MXgXAL5MOG47Kwe7e8BsybRKupjXEAPedvRQbBEksKEYqeR0k1juMPBBLBL1yu EtvQMBLntRAwi48pyZHPrZB3nFsQfgtu8sGYlIIiWZNaDboK4gUHRljHDd/x8uXgHLsn HJ/Z61kjrEFPP/ayGocSQ6Qw6WS072JJBUFH/iLJorUeBYZxGayVxJjlHanwUGPQYGNi YyKCInWEe3iJF9TQ23CPIdWZiYVODVtnRpVAXGv+0FLufEGIl3Sx48zeq2a0nBmGOcbx t9wVwP5eZLz7KIdrkHFevYsZx3kcxc22NdfRbMDeQhGRF9gRuT8LHH8ANuTzG5pU4AMw rNPw== X-Received: by 10.68.57.134 with SMTP id i6mr23101510pbq.9.1414910094085; Sat, 01 Nov 2014 23:34:54 -0700 (PDT) Received: from localhost.localdomain ([122.169.160.196]) by mx.google.com with ESMTPSA id pn4sm13903602pbb.12.2014.11.01.23.34.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Nov 2014 23:34:53 -0700 (PDT) From: Sudip Mukherjee To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Date: Sun, 2 Nov 2014 12:04:41 +0530 Message-Id: <1414910081-2487-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: alsa-devel@alsa-project.org, Sudip Mukherjee , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: Intel: fix missing mutex 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 on error in block prepare, we were returning the error code while still holding the mutex. We are releasing the mutex in this patch before return. Signed-off-by: Sudip Mukherjee --- sound/soc/intel/sst-firmware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index 35788ad..dca6d9a 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -1120,6 +1120,7 @@ int sst_block_alloc_scratch(struct sst_dsp *dsp) ret = block_list_prepare(dsp, &dsp->scratch_block_list); if (ret < 0) { dev_err(dsp->dev, "error: scratch block prepare failed\n"); + mutex_unlock(&dsp->mutex); return ret; }