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: 1249511 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 4CC7BDFFBF for ; Fri, 27 Jul 2012 13:00:20 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Suk3m-0003T5-6W; Fri, 27 Jul 2012 12:54:26 +0000 Received: from mail-wi0-f169.google.com ([209.85.212.169]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sujpv-0001EN-5Y for linux-arm-kernel@lists.infradead.org; Fri, 27 Jul 2012 12:40:07 +0000 Received: by wibhm2 with SMTP id hm2so624855wib.0 for ; Fri, 27 Jul 2012 05:39:03 -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=IWp8RBFsAFSe59fAfTtkVRfFRMh7kbKuon5ABkOFJJ8wqfoAfqTEOQA/BVk925ro0r dozFm3t4q2o2nCeyAOw7Pf1U26Q//jBj4xEeWrg91tIA+sGCTw4eyO3I1ESyGIzpZsja cRwrthJLPiWBX6x5Ayo9KaAv8JWTtg6HzDaBUcm+YC+39Xk2ajiHBgJMG7QFW4fB710k wHTh+SoOp/p9pi4uIj5dc+Je5/Uk/mkkS/aDDHl2yAnNOoYMXtacw4r1i4Gbrq/Ue6AP UtzK+LhsrS2CPaGzdoBnQ7B0KT/RvKAw2BKnxxD7KkHmZm1wBaWAb56CZCsqgPvr+eRD lnMw== 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 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: ALoCoQmOgidlLa8M6r1ohnAKRWlpCVIlKOW0c8zD6sEDPdM0/yMSWFPx5p3KlaYZWS3S9Zy2wpBo X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, sameo@linux.intel.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, olalilja@yahoo.se, STEricsson_nomadik_linux@list.st.com, Lee Jones , lrg@ti.com, linus.walleij@stericsson.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++; }