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: 1260711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 9F3793FC1A for ; Tue, 31 Jul 2012 15:07:41 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SwDyj-0004a0-9J; Tue, 31 Jul 2012 15:03:21 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SwDiB-0007RR-1d for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 14:46:15 +0000 Received: by wibhq4 with SMTP id hq4so2268187wib.0 for ; Tue, 31 Jul 2012 07:46:02 -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=fBXro7ct3bUBHABD5JDBgc4XWDF0OMn6W+M8k3agcy6sWIFbg8WlsbbcZ/W8aYfKC/ FI81WvadUUftR2IKsng42Q/Y6W/rt5U31eUtRJL+UxEuPszCnZ68A1qpbU4EboFUa08G +x+J8xL/GWnphoV8JaXtaarwbualEKqE+Vsl1AZ6Z1DKLZQU93BMgmonGB2tMBm+glHm iHhzvw+GUd6qUlr81LUqo420VZ8nrNpL5b8EtxaSSmTUF7yckxKhQGH906Ap2mjNdZZK kiv5nJKTMDnt69qIOHvayQEUPUo/+lHLfhz90ZhekPdpc3R71hX1ZEYdrh3gaQfrBrsF RXjA== 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 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: ALoCoQl7hy3H6CZPnPhE1gVWgbQgFm+OVedy6gceYumP7unsKlA6JsYSp77NS9DIH0fzCACrbGAy X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed 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 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++; }