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: 10396 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 C152B23E56 for ; Tue, 31 Jul 2012 13:31:48 +0000 (UTC) Received: from mail-qa0-f45.google.com (mail-qa0-f45.google.com [209.85.216.45]) by fiordland.canonical.com (Postfix) with ESMTP id 938A9A187E6 for ; Tue, 31 Jul 2012 13:31:48 +0000 (UTC) Received: by qaeb19 with SMTP id b19so1747449qae.11 for ; Tue, 31 Jul 2012 06:31:48 -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=QBCv9FeuorvtIoqnhEJ03W9V8qTRb8RqrwKeS61K9958Rmc2RqP2cyC1BEbT6gLVy6 o5ekh6lvODV0o2+GlyWuVZQUhd5CEU9mTQhDXybUJCdXxilO+4RdWEv8cjRkfw7yZYdB 9JS/Uw0hPqUVigR6UTuv+/29op5AVsDx21BUfu291CtjpaTIzj0H4n1rj/o4PMLcOSTr yTeDEaNGu+fwOoJEHeQIHqGRYbhJurPHkFB0K8Ycyu70XgqdQpUQwcf9zta+1AfasBrz vugcvLtQ9TbDo+UHB9nCJlGLSKPy9X0fNptDiNlEvBqf3gh9rSuJ/Kp8DljMXzd5Z5kb CcIA== Received: by 10.50.219.226 with SMTP id pr2mr1955453igc.51.1343741507748; Tue, 31 Jul 2012 06:31:47 -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 u8csp143085igz; Tue, 31 Jul 2012 06:31:47 -0700 (PDT) Received: by 10.180.93.68 with SMTP id cs4mr2326674wib.14.1343741506510; Tue, 31 Jul 2012 06:31:46 -0700 (PDT) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx.google.com with ESMTPS id n7si233413wiy.46.2012.07.31.06.31.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:31:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.170 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.170; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.170 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wibhq12 with SMTP id hq12so3338832wib.1 for ; Tue, 31 Jul 2012 06:31:46 -0700 (PDT) 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 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, lrg@ti.com, Lee Jones 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: ALoCoQmCAXN2vuo2Caq9VlH1KRkbaSIQdv9g6WSMGQM/gFOTuewXPjOFSnspw4c7SzBB+EgyHIRU 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++; }