From patchwork Sun Sep 24 18:41:49 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: 114137 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1806184qgf; Sun, 24 Sep 2017 11:43:22 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDrlJ/oOfmVLNd8iEBW1CZiQGeFpwfuiK+ccVExeY2fmNTmLUemqWPVA2kDa5YSX/1Sqshy X-Received: by 10.98.36.132 with SMTP id k4mr5376616pfk.148.1506278602457; Sun, 24 Sep 2017 11:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506278602; cv=none; d=google.com; s=arc-20160816; b=CCX+U+O4GNuf4GGh7vIRhtkU8x8FRanMzpMQiLhPYTBsLcYSrAfSQmLZHEvlcapFPI SwysjhuCwvp3k5P9sU8uWXOqp0pKZ2d7wUD3HYwJP4qvkRpAjSvBeFCqfkgTbYVXQmwn pyXzKsSokmsGpEdzYzWUiec8VxKr0nK80x5HgCQavLGVyUtXoBzXyjFqYl6u8zWkCrtc 7nhQRaLLfsF9sdJIKAiPnluy36xpEm3G+nOAu+eSLhu8vqLqXq/4qvaLPyfTAj0B2EL7 vbADQtfTnKHeMfpAQg1Foz8TdrcLaeypx4RiZdMSkvDviCX67Xy+dtV0JIzWBPuGzK1j TzPA== 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:cc:to:dkim-signature :dkim-signature:from:dkim-signature:arc-authentication-results; bh=y7+wut6CO/gJZEmbYWipy6uDn6cO5fNJNMywC2PK0YY=; b=Ozhhc/texYZJZ8WC130cVVpFAuzLPnNSjfXZZL6sJu1q1vRXikYwHpIInWe/gp86a8 QCfqUnPlct7qhN0RYX2WfNJZIRIVDmltdDy7i0WKbnb9UbZ2IdfbWAhwtlipR7u5FC0E AKmTOZVFmW9ia4wMBlfk4cOG8ArA3FJ8vIid9BkTi5/d4Oxmbjt2z+HzMiTrpx4SG8Yw A7n7+67OeYEfN1afFUBlRAzKRsAhApiX2JNs3zmXFERKsfx02JOal9mE9ntqedgivTgp ZmLnK/q4nU7xHRKF6rskcPqeXW7lBWaShHef0YxGXaaVgXZ/jtTm4IKnrAOLj7NflciO GXwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=W+JIU5i7; dkim=fail header.i=@verizon.com header.s=corp header.b=YD+Kymtv; dkim=fail header.i=@verizon.com header.s=corp header.b=nYbwoukS; 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 h4si3003187pgs.34.2017.09.24.11.43.22; Sun, 24 Sep 2017 11:43:22 -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=W+JIU5i7; dkim=fail header.i=@verizon.com header.s=corp header.b=YD+Kymtv; dkim=fail header.i=@verizon.com header.s=corp header.b=nYbwoukS; 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 S1752867AbdIXSnU (ORCPT + 8 others); Sun, 24 Sep 2017 14:43:20 -0400 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:23149 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752869AbdIXSnG (ORCPT ); Sun, 24 Sep 2017 14:43:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278586; x=1537814586; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrNlMAuO+kGz8IvYy8grTX7fQ3JOSV9GOBKiK2/7ba4=; b=W+JIU5i7jUUwT9MqFqg3bRF11e7GhmhPT6/LvUl+0285xTyBLiVS97vf iSYxirvb4ACPoQoKPjD8Bu3LeD5jdKy+1yijGPQckM7r5gQZVkFXNT38v HAtjdwGTLdVgDnedZF2LRiLBIkW5rZiaslXqqQZMdrflph1focLiOJ/Nq w=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe03.verizonbusiness.com with ESMTP; 24 Sep 2017 18:42:53 +0000 From: "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; 24 Sep 2017 18:42:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278563; x=1537814563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrNlMAuO+kGz8IvYy8grTX7fQ3JOSV9GOBKiK2/7ba4=; b=YD+KymtvOFG4pvgcNCfQpE5C5Yej97qk34Ge+8JSnO3VbdnuvEDUBYLq Z/JDwj2O5no/RALpOWaBtMQVH6Y/fElZ6t6SrKPcWm1H9y1c3WGK1EO8L eU/AfsmRLVkBF2qGd1olJBeTLEh+xUGySxhwS/+QuGhGCJmnaCQLz3tD+ g=; Received: from ranger.odc.vzwcorp.com (HELO mercury.verizonwireless.com) ([10.255.240.27]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2017 14:42:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278564; x=1537814564; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrNlMAuO+kGz8IvYy8grTX7fQ3JOSV9GOBKiK2/7ba4=; b=nYbwoukSUZ9DucLRhiu1kouxB7Bh5nV/e123EaxViHlYh7Z4KsQ35r7v sapI27eztVcVQKfcr6KxPmpP3xwCjgElXDIrDixd45ESiLr1HQmIyR8v+ 6RznTS+CATIPzrg+NMS2k6xNjroyGErgOQYmkp0ECcPKBt1JxRiwSpGC/ 8=; X-Host: ranger.odc.vzwcorp.com Received: from casac1exh002.uswin.ad.vzwcorp.com ([10.11.218.44]) by mercury.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 24 Sep 2017 18:42:44 +0000 Received: from scwexch04apd.uswin.ad.vzwcorp.com (153.114.130.23) by CASAC1EXH002.uswin.ad.vzwcorp.com (10.11.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 24 Sep 2017 11:42:41 -0700 Received: from OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) by scwexch04apd.uswin.ad.vzwcorp.com (153.114.130.23) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 24 Sep 2017 11:42:40 -0700 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 24 Sep 2017 13:42:39 -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; Sun, 24 Sep 2017 13:42:39 -0500 To: "gregkh@linuxfoundation.org" CC: "stable@vger.kernel.org" Subject: [GIT PULL for-4.9 51/96] ASoC: dapm: fix some pointer error handling Thread-Topic: [GIT PULL for-4.9 51/96] ASoC: dapm: fix some pointer error handling Thread-Index: AQHTNWTI21pHqfeUH0K/DD01RxNvrg== Date: Sun, 24 Sep 2017 18:41:49 +0000 Message-ID: <20170924184130.29445-52-alexander.levin@verizon.com> References: <20170924184130.29445-1-alexander.levin@verizon.com> In-Reply-To: <20170924184130.29445-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 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);