From patchwork Tue Jul 31 14:45:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10425 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 7AC2F24027 for ; Tue, 31 Jul 2012 14:46:09 +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 49986A18D27 for ; Tue, 31 Jul 2012 14:46:09 +0000 (UTC) Received: by ggnf1 with SMTP id f1so6010127ggn.11 for ; Tue, 31 Jul 2012 07:46:08 -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=dGnYU/fozBP4XK2LWtNFajGzdnaIpqIRDAFZtAYU+pjD88L+1i8v6wnOiTDssAmClT lXl7o6y6TGdgothQQIwGO3WohtWp0Vp92iJK+RzWHZLH4yzgT3KzwL//3GTp/fT+A4rf Q8FWiaexDKRS3RNLVn4DV8QL8xR1H1enR99/IHm5Twf157a7q8SiNb7Bq80Jr6iXeG+C IIYaFh2y/zSdbt/TskDQiLf8YMusQ1w5otDhWtdv5qw2yMXqSD3uQTQUDEHI10ks3iW4 d6JRkSqesLiPII64n4H+qEE+q7Z1WQWOlbFxFzCG7o0u6c5YYItg4q6uH74bocTqS8qZ zD6A== Received: by 10.50.213.39 with SMTP id np7mr2194308igc.51.1343745968569; Tue, 31 Jul 2012 07:46:08 -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.50.87.40 with SMTP id u8csp147924igz; Tue, 31 Jul 2012 07:46:04 -0700 (PDT) Received: by 10.14.218.134 with SMTP id k6mr3574918eep.14.1343745962593; Tue, 31 Jul 2012 07:46:02 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id m1si310634wee.128.2012.07.31.07.46.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 07:46:02 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds11so5685678wgb.31 for ; Tue, 31 Jul 2012 07:46:02 -0700 (PDT) Received: by 10.180.85.167 with SMTP id i7mr7500595wiz.8.1343745962114; Tue, 31 Jul 2012 07:46:02 -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 j6sm695412wiy.4.2012.07.31.07.46.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 07:46:00 -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, alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com, Lee Jones Subject: [PATCH 1/5] ASoC: dapm: If one widget fails, do not force all subsequent widgets to fail too Date: Tue, 31 Jul 2012 15:45:40 +0100 Message-Id: <1343745944-18418-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343745944-18418-1-git-send-email-lee.jones@linaro.org> References: <1343745944-18418-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmSGvF4+BBZlYa4MI6tmFO9hxi/G6duxQelHim5eTHz5V5eKDMABRGNKylt9ehhlYMxwwC+ 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++; }