From patchwork Fri Jul 27 12:38:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10307 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 59E5423E23 for ; Fri, 27 Jul 2012 12:39:06 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2883BA1912F for ; Fri, 27 Jul 2012 12:39:06 +0000 (UTC) Received: by ggnf1 with SMTP id f1so3101136ggn.11 for ; Fri, 27 Jul 2012 05:39:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=cPCHXK3TXDplqhhpplTilal5gTCnccUXB5u5axYYM7w=; b=lHTDwh7+i5ouT08DLlVGACIpdx53zkZAGi7PSJ18EmNdD4u1X6YJxGMO4iT9uVfBuO eDNSbdFZNScEyHTokm6vFdioOop0E+NGNgOI1tyi3OFvwu96+0K8MKdmjMCr6Gz8ug9j sgnCeijK1/LqFqAr9ccjkpoYfjrBo71QsmilhqpXq1vjwZzxsFggYtC8njRY5elxQ5I/ JB94loJyy5pdybmpbOrlDX/YF++CytC5VD0Oc2ioKMN7KCxYNzMfK1KjtYVZU8FeaFUM E7ivF1YWg4H6xgvm4YL7np7wftMF4N3u5N8FSD/Qg5du9UUp7TybTJoFH0ZSJomBtM3/ QVjA== Received: by 10.50.220.136 with SMTP id pw8mr1836376igc.1.1343392745251; Fri, 27 Jul 2012 05:39:05 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.43.93.3 with SMTP id bs3csp29396icc; Fri, 27 Jul 2012 05:39:04 -0700 (PDT) Received: by 10.216.242.196 with SMTP id i46mr1173134wer.140.1343392743613; Fri, 27 Jul 2012 05:39:03 -0700 (PDT) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id 49si2661792wet.20.2012.07.27.05.39.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 05:39:03 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wgbfm10 with SMTP id fm10so613617wgb.1 for ; Fri, 27 Jul 2012 05:39:03 -0700 (PDT) Received: by 10.217.2.80 with SMTP id o58mr1322155wes.37.1343392743073; Fri, 27 Jul 2012 05:39:03 -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 ef5sm6242502wib.3.2012.07.27.05.39.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 05:39:02 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, olalilja@yahoo.se, ola.o.lilja@stericsson.com, sameo@linux.intel.com, alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com, lrg@ti.com, Lee Jones Subject: [PATCH 1/7] ASoC: dapm: If one widget fails, do not force all subsequent widgets to fail too Date: Fri, 27 Jul 2012 13:38:48 +0100 Message-Id: <1343392734-11805-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343392734-11805-1-git-send-email-lee.jones@linaro.org> References: <1343392734-11805-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmMLXyYJkdA0SCorzGHBpiaJ7ue/gob2adoTYcnUQIBG9oFoc714fV+3eTZ7qDDNiHRokEN 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++; }