From patchwork Tue Jul 31 13:31:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1260021 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 99457DF26F for ; Tue, 31 Jul 2012 13:54:31 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SwCmc-0000OQ-Eq; Tue, 31 Jul 2012 13:46:46 +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 1SwCYn-0007YM-85 for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 13:32:29 +0000 Received: by wibhq4 with SMTP id hq4so2200709wib.0 for ; Tue, 31 Jul 2012 06:31:46 -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=P9fcGcUjeAjVY4SbP/9euGzPKZIWsZgezXrgmyCSx5VQYNqekJ+jFNIbWb2381+yEC tAR4/zhVzZqSMkaMIrCo1BgbcgzCWLdQb7BO0pq+peMejNPHFZHwjTAizbza7D03C2zn xVOil/UD+Tl956kL0k+4kQZOt9WzZ3GsCYnoS0OgXvfzaXrUP/2IjZK2lANuJjxOItyM ZXEQ6goCN8mJKPtHLdnBe+YLIHQWq/pA7toKagwvGjUDcJ/1TD5ATi7CPl2DIkHqBUCg mD1Aldl4J2lG9tyGPhe3pnBzMzACK340dxUE3T4jmkPAyJGzIL+7zPFQWPDVJmswvJSf UcMg== Received: by 10.180.107.103 with SMTP id hb7mr6975372wib.3.1343741506000; Tue, 31 Jul 2012 06:31:46 -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 ex20sm263310wid.7.2012.07.31.06.31.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:31:45 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] ASoC: dapm: If one widget fails, do not force all subsequent widgets to fail too Date: Tue, 31 Jul 2012 14:31:23 +0100 Message-Id: <1343741493-17671-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> References: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQny3YoI3+2CvWhB0U7kQ3W3Hw77Qz5VS+dwBUMytiUXTsXHzmguA4XNu8NGiIx8I0IX0/9U 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 , lrg@ti.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++; }