From patchwork Wed Sep 20 04:45:06 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: 113081 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp323499qgf; Tue, 19 Sep 2017 21:58:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDzIuWxC7pBIIyyi4AEoB/2NGCdGw55p1NUUxITnIWgHAq4D4MthH2I3e865b2vCwhcMuWV X-Received: by 10.84.247.131 with SMTP id o3mr879896pll.365.1505883536371; Tue, 19 Sep 2017 21:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505883536; cv=none; d=google.com; s=arc-20160816; b=KncILCEU1hGSb6SdApLpHuitkwo2pjf0S20N3ZQZgWT+2bPoUzLRYPtvz0B8pxeVYB wk+1YDHTPWczaENW5GdAOumfeXcu1A2SkJPSV559/1i8jNTj6aWZVIib5nSjFqyTQCWp Z5wEC3mLQIFOhWbn4ajJ6phZLB0Jwi6cS1/cxCXjF5dyLI8exJv2DGFUOYefybNMDcb9 TCb3kxCdmiLGdKEh51T3jrgySpccmcuPEHZ2w7e0W28XdQ9DCuy4BhKHUowyDCpAgxNm 7fNcJfKaoECgT96T434dGQVmLH1jSiOkgv7pL7Opdw5yraMaJow9hgEG4u0HI6GSbTnb sJFg== 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=s0qM7fF7Ld1kB+83wa61A4A6qijfTYbSUGHrH2Q0e+I=; b=0lP9XcrDmdpJqk/nBW71Xl8gY+RwSGdYu0A3Na7KiQaYGftE+YJErKvM2Bfb8rninb eS6eS0wF3rRKyDdTe0A6v3at3FR4zyu6IJ1EnbQEXPkmo09LApv/tygDYCQTj0eeb4LB ucduFIbIr+e/o2hbHaz8s3NCaj1rzMCkP5/TboOyukzSlNMA8E6vfyy6dzLSa0umL4H+ aG5QOTKF90FE0629JEXSbvEFvNSv41k+CMRZBAnQn/RNvMrEZp3KCjcG1rV1gt9TghMB lH7PVlV9RlDqGGKPOTWWujhnESfQsbtbf8EmQtsyeynGe6ZNXg5SSJsoiS86JO18vMfA RIUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=VghmM5GD; dkim=fail header.i=@verizon.com header.s=corp header.b=nqziIYVc; dkim=fail header.i=@verizon.com header.s=corp header.b=nqziIYVc; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 q3si730366pll.696.2017.09.19.21.58.56; Tue, 19 Sep 2017 21:58:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=VghmM5GD; dkim=fail header.i=@verizon.com header.s=corp header.b=nqziIYVc; dkim=fail header.i=@verizon.com header.s=corp header.b=nqziIYVc; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1751828AbdITE6y (ORCPT + 7 others); Wed, 20 Sep 2017 00:58:54 -0400 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:63874 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbdITEqA (ORCPT ); Wed, 20 Sep 2017 00:46:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505882760; x=1537418760; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys/SH9t+UZZg6XH6nC4RpJYN1sWalwh4lHvIM4LaTSQ=; b=VghmM5GDDhChc97dC1+osNe9nR50hj2pCsx052OFcdE5qEKsLyk9Y3QG vr+Echv9x4FuyiA7siXL14PtNYOSlx1UAsE/KuejftHc5VTv9uL51rtKS +aM8KocyRUPw1EPHwtX+FNSJVPGwI56+TIcwBho731PmFQ274ToPc3Dwj M=; Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by omzsmtpe01.verizonbusiness.com with ESMTP; 20 Sep 2017 04:45:49 +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 apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi03.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Sep 2017 04:45:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505882730; x=1537418730; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys/SH9t+UZZg6XH6nC4RpJYN1sWalwh4lHvIM4LaTSQ=; b=nqziIYVcFkQnWeGJch+uuCmBGYLrQuDq16jxi5XrZW6YxXKbtbuXy+JR ljOTNfGSv1k8CyVWkv2XX2y6KL8fH1vJKo/jk+NziToTVBW69G15rmwHA JAAOKA2i7nX0t8QdehA/FeSUT5PNxve72L2cD3y2nX+GaXsJomIlaU6qW Y=; Received: from discovery.odc.vzwcorp.com (HELO mercury.verizonwireless.com) ([10.255.240.25]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Sep 2017 00:45:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505882730; x=1537418730; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys/SH9t+UZZg6XH6nC4RpJYN1sWalwh4lHvIM4LaTSQ=; b=nqziIYVcFkQnWeGJch+uuCmBGYLrQuDq16jxi5XrZW6YxXKbtbuXy+JR ljOTNfGSv1k8CyVWkv2XX2y6KL8fH1vJKo/jk+NziToTVBW69G15rmwHA JAAOKA2i7nX0t8QdehA/FeSUT5PNxve72L2cD3y2nX+GaXsJomIlaU6qW Y=; X-Host: discovery.odc.vzwcorp.com Received: from casac1exh003.uswin.ad.vzwcorp.com ([10.11.218.45]) by mercury.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 20 Sep 2017 04:45:29 +0000 Received: from scwexch30apd.uswin.ad.vzwcorp.com (153.114.130.49) by CASAC1EXH003.uswin.ad.vzwcorp.com (10.11.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 19 Sep 2017 21:45:18 -0700 Received: from OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) by scwexch30apd.uswin.ad.vzwcorp.com (153.114.130.49) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 19 Sep 2017 21:45:18 -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; Tue, 19 Sep 2017 23:45:16 -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; Tue, 19 Sep 2017 23:45:17 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH review for 4.4 29/47] ASoC: dapm: fix some pointer error handling Thread-Topic: [PATCH review for 4.4 29/47] ASoC: dapm: fix some pointer error handling Thread-Index: AQHTMcs7aKA7A5jkkEGGB0dINauT+g== Date: Wed, 20 Sep 2017 04:45:06 +0000 Message-ID: <20170920044445.7392-29-alexander.levin@verizon.com> References: <20170920044445.7392-1-alexander.levin@verizon.com> In-Reply-To: <20170920044445.7392-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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 df036afb2197..6a438a361592 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3794,6 +3794,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); @@ -3813,6 +3823,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);