From patchwork Fri Jan 20 13:07:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92081 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp13049qgi; Fri, 20 Jan 2017 05:21:02 -0800 (PST) X-Received: by 10.223.161.222 with SMTP id v30mr13461075wrv.114.1484918462477; Fri, 20 Jan 2017 05:21:02 -0800 (PST) Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id u66si7940490wrc.269.2017.01.20.05.21.02; Fri, 20 Jan 2017 05:21:02 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 22833266A02; Fri, 20 Jan 2017 14:21:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, T_DKIM_INVALID autolearn=disabled version=3.4.0 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1AC37266725; Fri, 20 Jan 2017 14:18:43 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6B148266EC7; Fri, 20 Jan 2017 14:08:03 +0100 (CET) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by alsa0.perex.cz (Postfix) with ESMTP id D244E265A82 for ; Fri, 20 Jan 2017 14:08:01 +0100 (CET) Received: by mail-lf0-f48.google.com with SMTP id z134so57854970lff.3 for ; Fri, 20 Jan 2017 05:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=OBlrg4vhYgvuQbtu+cJIo58TXQ7ThXwx1UIUEpGLAIE=; b=VGi1/0mYsbceDIogb0+dvBtCv3pptMHR0MR1k/OA/T8MNTj4P6POARqVGFJwXsPMB8 JuhDYCE4oWVsKeBGsqwTQ62P/WakL8zCm8l+SN2yBWUE9UWmcmTamtXVhigs4L2rm1Oe 6mkwd6fMbB4R7merOzOUYe0fmhpiNNWLe8fYM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OBlrg4vhYgvuQbtu+cJIo58TXQ7ThXwx1UIUEpGLAIE=; b=UKKtVi1f2V07bRHBOF8ZNgcfsRug5zJb0pgbLisqmruxRsJjdrRSflMkbDLX/b6rDS dZqCdqmwBwjfEbHra3/EHrRVVPUOE8k4kiDkjeLkAqmw/NJoYT8rmLZXpMnHyWOyvuE3 Q++CEntw6KVW3JnQucK4Xss48Gsth2CmmbFdNfzgEmw2A39rPWdttZyfD+bp08BDprwC 7qux3se/VDAVGeosUJqlos9eUXthf6l2if+z9doruFGS9sPwYB+5YzDDczlWUmWTx8rE 5t4fKlFKKkxFjxM5Qqxqz/jJsFj5RzVmpeGtIWhAnYCFrzdTf9O6Rhu4SG2WtYBDIzQC 2iLw== X-Gm-Message-State: AIkVDXK85WKLT2rWQXKKoAA6AUdI1YIrRYZx+g+59CFkwuJCUJAUySN6lZpMIKRqd1+0CdPC X-Received: by 10.46.69.139 with SMTP id s133mr6801058lja.56.1484917680809; Fri, 20 Jan 2017 05:08:00 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id x78sm3437183lfb.44.2017.01.20.05.07.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 05:08:00 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Date: Fri, 20 Jan 2017 14:07:52 +0100 Message-Id: <20170120130752.29107-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Linus Walleij , Dan Carpenter Subject: [alsa-devel] [PATCH] ASoC: dapm: fix some pointer error handling X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org commit 66feeec9322132689d42723df2537d60f96f8e44 "RFC: ASoC: dapm: handle probe deferrals" forgot a to update some two sites where the call was used. The static codechecks quickly found them. Cc: Lars-Peter Clausen Cc: Dan Carpenter Reported-by: Dan Carpenter Fixes: 66feeec93221 ("RFC: ASoC: dapm: handle probe deferrals") Signed-off-by: Linus Walleij --- sound/soc/soc-dapm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.9.3 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index b218cc7bd994..dcef67a9bd48 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3935,6 +3935,16 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, template.name); w = snd_soc_dapm_new_control_unlocked(dapm, &template); + if (IS_ERR(w)) { + int ret = PTR_ERR(w); + + /* Do not nag about probe deferrals */ + if (ret != -EPROBE_DEFER) + dev_err(dapm->dev, + "ASoC: Failed to create %s widget (%d)\n", + dai->driver->playback.stream_name, ret); + return ret; + } if (!w) { dev_err(dapm->dev, "ASoC: Failed to create %s widget\n", dai->driver->playback.stream_name); @@ -3954,6 +3964,16 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, template.name); w = snd_soc_dapm_new_control_unlocked(dapm, &template); + if (IS_ERR(w)) { + int ret = PTR_ERR(w); + + /* Do not nag about probe deferrals */ + if (ret != -EPROBE_DEFER) + dev_err(dapm->dev, + "ASoC: Failed to create %s widget (%d)\n", + dai->driver->playback.stream_name, ret); + return ret; + } if (!w) { dev_err(dapm->dev, "ASoC: Failed to create %s widget\n", dai->driver->capture.stream_name);