From patchwork Sat Mar 22 18:34:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 26899 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7D056206A6 for ; Sat, 22 Mar 2014 18:35:23 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id gq1sf14898538obb.11 for ; Sat, 22 Mar 2014 11:35:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=mkIb+wnMUgsSUCaHLLRW3PMxGnETDyjawtMX/sSLtqo=; b=l/Z1Fz9jArwnco4XBvXwV8Aa+sRzkxMj4oLqJQwiKjuhg35biG8iS5MjobH/kKfXf3 QpGp9knvf9p6GtnIw9rJ4i8aYaerB3thPqvrf/N2YZ5s7RERhlDwArL6fEjH/ipslY/m 3/uG2OsbusMy9ou6rwR3PhA31QF50wOWQO9YEvW18E9BHc+9b9oXdyi7g2rm7w1JkxjY kJ8UndE2wpgyNVVUS8PrH+iZD+ymOr3EpyaaTjmOAChL3MQowLL4/pxlOHgfWoXjXUOR 1WKSOSUfZ/haY3S/fTrVpCnyjewAx8Krarbd0HGLdt96MaPKz6HGuN+1a4BNQV3mvh+P 0USw== X-Gm-Message-State: ALoCoQlbKGkzJKjSoRu+gNeKwGH7dQo6GO5pVmkd4CKnoRLFWYU6lngjxMughdwh325qhH3sDu+0 X-Received: by 10.42.250.196 with SMTP id mp4mr19624386icb.29.1395513322969; Sat, 22 Mar 2014 11:35:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.50 with SMTP id k47ls148706qgd.61.gmail; Sat, 22 Mar 2014 11:35:22 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr43005224vcm.11.1395513322766; Sat, 22 Mar 2014 11:35:22 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id sn5si2037023vdc.137.2014.03.22.11.35.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 22 Mar 2014 11:35:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so3934078veb.8 for ; Sat, 22 Mar 2014 11:35:22 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr22157352vek.22.1395513322660; Sat, 22 Mar 2014 11:35:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp110966vck; Sat, 22 Mar 2014 11:35:22 -0700 (PDT) X-Received: by 10.14.251.204 with SMTP id b52mr32327761ees.36.1395513321444; Sat, 22 Mar 2014 11:35:21 -0700 (PDT) Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id z2si13369843eeo.334.2014.03.22.11.35.20 for ; Sat, 22 Mar 2014 11:35:21 -0700 (PDT) Received-SPF: neutral (google.com: 77.48.224.243 is neither permitted nor denied by best guess record for domain of alsa-devel-bounces@alsa-project.org) client-ip=77.48.224.243; Received: by alsa0.perex.cz (Postfix, from userid 1000) id A7CC0261740; Sat, 22 Mar 2014 19:35:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 64B98261721; Sat, 22 Mar 2014 19:35:09 +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 5BDA626172C; Sat, 22 Mar 2014 19:35:07 +0100 (CET) Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 210CB261718 for ; Sat, 22 Mar 2014 19:34:56 +0100 (CET) Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WRQkl-0003PV-4i; Sat, 22 Mar 2014 18:34:44 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1WRQkg-0000Le-ED; Sat, 22 Mar 2014 18:34:38 +0000 From: Mark Brown To: Patrick Lai , Liam Girdwood Date: Sat, 22 Mar 2014 18:34:36 +0000 Message-Id: <1395513276-1305-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 1.9.1 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] [PATCH] ASoC: pcm: Drop incorrect double/extra frees X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Mark Brown The changes in "ASoC: pcm: free path list before exiting from error conditions" actually introduced both double frees (in case where the path list was allocated but empty) and frees of unallocated memory (in cases where the error being handled was -ENOMEM. Drop the commit for now. Fixes: e4ad1accb (ASoC: pcm: free path list before exiting from error conditions) Reported-by: Ben Hutchings Signed-off-by: Mark Brown --- sound/soc/soc-pcm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 28522bd03b8e..47e1ce771e65 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1989,7 +1989,6 @@ int soc_dpcm_runtime_update(struct snd_soc_card *card) paths = dpcm_path_get(fe, SNDRV_PCM_STREAM_PLAYBACK, &list); if (paths < 0) { - dpcm_path_put(&list); dev_warn(fe->dev, "ASoC: %s no valid %s path\n", fe->dai_link->name, "playback"); mutex_unlock(&card->mutex); @@ -2019,7 +2018,6 @@ capture: paths = dpcm_path_get(fe, SNDRV_PCM_STREAM_CAPTURE, &list); if (paths < 0) { - dpcm_path_put(&list); dev_warn(fe->dev, "ASoC: %s no valid %s path\n", fe->dai_link->name, "capture"); mutex_unlock(&card->mutex); @@ -2084,7 +2082,6 @@ static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream) fe->dpcm[stream].runtime = fe_substream->runtime; if (dpcm_path_get(fe, stream, &list) <= 0) { - dpcm_path_put(&list); dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", fe->dai_link->name, stream ? "capture" : "playback"); }