From patchwork Thu Sep 14 15:51:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 112576 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp907989qgf; Thu, 14 Sep 2017 08:57:35 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBgG72bZGcya87UPpgUDqrPk5PKwjpaPs2lxcYpDOTt5kv62woau3rj8y9TDCLTcP4pfR9g X-Received: by 10.99.47.68 with SMTP id v65mr3748683pgv.452.1505404655429; Thu, 14 Sep 2017 08:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505404655; cv=none; d=google.com; s=arc-20160816; b=MqAy/oXsFzzyD7F7bigW6ews0Vp0Un7lnEw0PPEAhdHgJGjNrGIcO60n9EOPu26Jvb nIVRpB6kG/uSmG3B/Tlzx3tIsW2RMHALuX6uK9p69A/z4qpyaku0YKlv/6bw5yxcNy8k eGukXi9LqnzR4yU7pkO7znTHnJLDS53oZ6+vbF32iALEV6OfEFo3KOLFMBVxS0zOyYdj X3csMv+OSS0g5qN/XddMGCRaxFIMFiKwJhTJ6BxYtxfjCIw8A236QjG3nLFzYEhsz9ON CXVn4bLiPmWBtxCb8t7/qciKiehcwP98YB0q3n4oTvV1qYJu8OsEJ9tyQetYBghFxirr zDAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=y7+wut6CO/gJZEmbYWipy6uDn6cO5fNJNMywC2PK0YY=; b=TMq1ZCLJsKcScbUyD8VD8GNvE9lZg08zjHllgy2I/91QDiQaRKJnzt6DkFJEeb8pXj JD/1IKwNpkNpzhc2DpIvnfpvlku9QQt1bpNAXm1tLhMmAkksAevttjh0vY94tRG+kDRq +i2UNRkDQbpRhcwrnoqaYYd2zsQSo73lm7NsF94NGq68Dz+w+MN1ax03d2pGdG6x6jVb LosPj52yNie+eh9zkQpLZZaqDMX3K+TZ7/cTI5pedDOpqMeaBtxMco8gOGaKCtfpKOWO /e4p5iFsLyvgvAdUKJ6fEk8xaMLAQsyrr5zH7nOL1lmRRx/9iqVkDDW0TCuYp/vDOc8v 8gYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=s0LgtvbM; dkim=fail header.i=@verizon.com header.s=corp header.b=f5bRKyzY; dkim=fail header.i=@verizon.com header.s=corp header.b=O2fsU/DS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p29si10122896pgn.596.2017.09.14.08.57.35; Thu, 14 Sep 2017 08:57:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=s0LgtvbM; dkim=fail header.i=@verizon.com header.s=corp header.b=f5bRKyzY; dkim=fail header.i=@verizon.com header.s=corp header.b=O2fsU/DS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbdINP4E (ORCPT + 26 others); Thu, 14 Sep 2017 11:56:04 -0400 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:55658 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbdINPwv (ORCPT ); Thu, 14 Sep 2017 11:52:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505404371; x=1536940371; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrNlMAuO+kGz8IvYy8grTX7fQ3JOSV9GOBKiK2/7ba4=; b=s0LgtvbMrazqr9VymQMHHtmJZjrMl82my5Ol/EGWGE9gmAzOmOTAs+nn 2h6CuqV62pUKuw7ZRVh0AYZhW8iUptPA3TfA7CoCTdkXtZZsSSQp07xxr q666sXKMIRM6144MKQ2DoVVarDE6xfwrAUGPkaVLKFn7XG2GakhkZtNGq I=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe01.verizonbusiness.com with ESMTP; 14 Sep 2017 15:52:47 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Linus Walleij , Mark Brown , "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2017 15:52:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505404363; x=1536940363; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrNlMAuO+kGz8IvYy8grTX7fQ3JOSV9GOBKiK2/7ba4=; b=f5bRKyzYgw/yMs4DPk1Kq01D0sfHOdFrlcZztjCZcKrseYE/zhC0Bu+1 zye9GSVpkaJ4ea5P/QvLj3SOdWyH/6TQOSiGY7R8SpRFwv6wuvj4Nukwm juPxdY5ND9l2ggA2N07D37VmLpTd/Xj9OYcj9XREnkyCSesw82tq1KGi0 o=; Received: from discovery.odc.vzwcorp.com (HELO mercury.verizonwireless.com) ([10.255.240.25]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2017 11:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505404362; x=1536940362; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrNlMAuO+kGz8IvYy8grTX7fQ3JOSV9GOBKiK2/7ba4=; b=O2fsU/DScQ4XI0HKihr6m9MrME+oqGz+v5+FxB4I3Zw6vVT81T0P1PUf nINbtjwF1Oebk+73ncDu1KbVVFyA9vBu/6nZJvTx7yURPorO3AOp5A0hS DmplorTKLd0SgW94lEuFj1dECyIKGDLNMPy2CI/yvMTgBx6QOfXLd56cI k=; X-Host: discovery.odc.vzwcorp.com Received: from casac1exh001.uswin.ad.vzwcorp.com ([10.11.218.43]) by mercury.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 14 Sep 2017 15:52:29 +0000 Received: from scwexch16apd.uswin.ad.vzwcorp.com (153.114.130.35) by CASAC1EXH001.uswin.ad.vzwcorp.com (10.11.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 14 Sep 2017 08:52:15 -0700 Received: from OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) by scwexch16apd.uswin.ad.vzwcorp.com (153.114.130.35) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 14 Sep 2017 08:52:14 -0700 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 14 Sep 2017 10:52:07 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Thu, 14 Sep 2017 10:52:08 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH for 4.9 53/59] ASoC: dapm: fix some pointer error handling Thread-Topic: [PATCH for 4.9 53/59] ASoC: dapm: fix some pointer error handling Thread-Index: AQHTLXFOoenTsZBztUe14y5RoAiKGQ== Date: Thu, 14 Sep 2017 15:51:19 +0000 Message-ID: <20170914155051.8289-53-alexander.levin@verizon.com> References: <20170914155051.8289-1-alexander.levin@verizon.com> In-Reply-To: <20170914155051.8289-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 639467c8f26d834c934215e8b59129ce442475fe ] 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. Reported-by: Dan Carpenter Fixes: 66feeec93221 ("RFC: ASoC: dapm: handle probe deferrals") Signed-off-by: Linus Walleij Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-dapm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.11.0 diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 411f7574dd0b..6780eba55ec2 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3843,6 +3843,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); @@ -3862,6 +3872,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);