From patchwork Thu Jul 26 10:28:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1241421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 10ABFDFFBF for ; Thu, 26 Jul 2012 10:41:40 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SuLR7-0000RX-K6; Thu, 26 Jul 2012 10:36:53 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SuLJr-0008GO-Bj for linux-arm-kernel@lists.infradead.org; Thu, 26 Jul 2012 10:29:39 +0000 Received: by wgbez12 with SMTP id ez12so1202217wgb.18 for ; Thu, 26 Jul 2012 03:29:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=cPCHXK3TXDplqhhpplTilal5gTCnccUXB5u5axYYM7w=; b=b5U13wHvL/14EPEblRKCxlD/vRnNSfAbecMITbs8LicsXJxm6gl+p4pc++csX3iaN+ TTJEUnPYPTKXrZdSHeCxIUiQd/HJktWcx2RfyG5cF87XgRTNQGjkha3+8GQ18NghGvwl fJyhT3Qc/csAV996wN+6vAZl4rmykuETCFaAqbsrS4/WJ2I5U6ebv333P5iff03Akjix P12/dMRXeWmPvNEZ3TPByfSOzSkS4GkdTj60EZg0MSL7Kdtpl+A7JdgMbudixPUGiYpR qbnYKqxF5NRiflvS5Zn0F7vQV0OYJMRQfLpNA9N3H1I6cct4Dpuqwc4F23GCd+D1BIMO KW4Q== Received: by 10.180.81.66 with SMTP id y2mr12220503wix.22.1343298561574; Thu, 26 Jul 2012 03:29:21 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id fb20sm11559455wid.1.2012.07.26.03.29.20 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 03:29:21 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/21] ASoC: dapm: If one widget fails, do not force all subsequent widgets to fail too Date: Thu, 26 Jul 2012 11:28:39 +0100 Message-Id: <1343298534-13611-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343298534-13611-1-git-send-email-lee.jones@linaro.org> References: <1343298534-13611-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnQDfn0D4VaryAP+00iRTYQeeNDxWBk9qrwuTYiXRnCz8Tg9Grrcg2iOP5RBzPP1g2nwZaO X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, linus.walleij@stericsson.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, olalilja@yahoo.se, STEricsson_nomadik_linux@list.st.com, Lee Jones , lrg@ti.com, sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.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 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If a list of widgets is provided and one of them fails to be added as a control, the present semantics fail all subsequent widgets. A better solution would be to only fail that widget, but pursue in attempting to add the rest of the list. Signed-off-by: Lee Jones --- sound/soc/soc-dapm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index eded657..7d9c154 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3095,8 +3095,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, dev_err(dapm->dev, "ASoC: Failed to create DAPM control %s\n", widget->name); - ret = -ENOMEM; - break; } widget++; }