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: 10253 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 03AAC23E56 for ; Thu, 26 Jul 2012 10:29:24 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id BB5CFA18866 for ; Thu, 26 Jul 2012 10:29:23 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so1774077ghb.11 for ; Thu, 26 Jul 2012 03:29:23 -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=eZn34CsQ7XWVW9WbE81YhavixiV67P2Clj7KMerOdwippdvW0miXg9UFBUlGot//Nz lxuvzs4pMYnB2/mHvlbwswPo44DXzgmd6WVgNAekHLTlKcs3XONpH81Rfzo7utuS3lXM TYBh5XXruyI8km1+poNQ3gKfzl0mjUCsFKKyVR1BwqtNaYGKKorzS1xnyQfbZsMnStMl QQhQBY8cwTBOir6Ns0EhtuMAtQXBG+6oeQlpXeItYy+wGUcqMDHc0boCsKdh/rUUy7q+ 8VkttMhce0yhDUPB7HKWlWCRl0141851abS+dkp5NJWyiTexNh4EQ/XhlH4a1JmuOg61 HwBw== Received: by 10.50.242.73 with SMTP id wo9mr1178731igc.1.1343298563121; Thu, 26 Jul 2012 03:29:23 -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 bs3csp133357icc; Thu, 26 Jul 2012 03:29:22 -0700 (PDT) Received: by 10.180.90.195 with SMTP id by3mr12130477wib.7.1343298561664; Thu, 26 Jul 2012 03:29:21 -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 b57si24102927wef.8.2012.07.26.03.29.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 03:29:21 -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 ds11so1580986wgb.31 for ; Thu, 26 Jul 2012 03:29:21 -0700 (PDT) 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 Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com, olalilja@yahoo.se, ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, lrg@ti.com, Lee Jones 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: ALoCoQkbxsDs3Ya+EAGgCcAEgfD1sxGQUgCO00wZQ0wVY7mwQfTukWl67THABGdR670xhLpoKIZe 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++; }