From patchwork Sun Sep 24 18:42:25 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: 114143 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1807434qgf; Sun, 24 Sep 2017 11:45:24 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAfLJuMMZ21cKwAaRzEWDf525GANF/FJDaqoUFVeu1MbilU4mSEmnvzydvCTlHI5ucIauZF X-Received: by 10.99.109.68 with SMTP id i65mr5463678pgc.335.1506278724532; Sun, 24 Sep 2017 11:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506278724; cv=none; d=google.com; s=arc-20160816; b=tgNdvLTKlpjqlSWMG95hm1DSa/7X7vQ+D4eH5WsVtS9Em/0RbVI73FscIN6pp3X7vh OoK3HCarN0fP5zWJUTKgA/s2SzqNpzPTR2lBNs4GuOD/ZV/KV2SXV5S5ELDiE4CrVS9k +aLxpecjtkOhd9t7IPxsS6QOTC37Qkve3t23U5mWM9Ur8zHq4N85wWK8T1DPvWQWOJV4 D8E2F798uH6WwQSqapV89dtalX2dNwejyFWywJgWXlvQAEkMNZoQhsoUTH7n33PpBZD1 k86WNPKPfVUwb3+sh/J8Npuq4HOMJIh1bGt5OsVw5vXUOjjpIjYcRrVjoU0uL5E0NVbe V4/Q== 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=s0qM7fF7Ld1kB+83wa61A4A6qijfTYbSUGHrH2Q0e+I=; b=C1alfzUoM2+y+S/Y0z8ohLIHpZwRrghMlUaPbK7IKqoaX0YVhZ15xuxQkVIVFDWpBt Ka6cfLnvtLqQmnOXItWQwmpkOAxr2o/Ojq3yQrV7pnFcECNmfIskLaZ8WDdWLdxlS12y Uem6Qaz7/4J3/IUvZrlzocQKmz7QQIeR9PhcSRRg6E186sr6oguVHcpt3iC1I702MvlL yaavtZHpYt+lgenVOia4wayif+tbP3vlHbbi3ZyB5cCouKX3X0ecQg52FtGg8CmoHXo+ x67LqrfEKauxXVkdHE6ooQg8L8EG9nKSV41BsUcPrC8ln4cmqKcS+BIrHcYx/3/86l5J ZOvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=jLwObZv9; dkim=fail header.i=@verizon.com header.s=corp header.b=mulr3Csz; dkim=fail header.i=@verizon.com header.s=corp header.b=DKyvzYzS; 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.45.24; Sun, 24 Sep 2017 11:45:24 -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=jLwObZv9; dkim=fail header.i=@verizon.com header.s=corp header.b=mulr3Csz; dkim=fail header.i=@verizon.com header.s=corp header.b=DKyvzYzS; 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 S1753050AbdIXSpX (ORCPT + 8 others); Sun, 24 Sep 2017 14:45:23 -0400 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:35807 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbdIXSpM (ORCPT ); Sun, 24 Sep 2017 14:45:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278711; x=1537814711; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys/SH9t+UZZg6XH6nC4RpJYN1sWalwh4lHvIM4LaTSQ=; b=jLwObZv9UOVxshQqbqsj0WY1bhyOTI2OiEzX8u9muI9HBFfKeCvZFdb9 pNK6n48sh5C6oN7zOlPmR/3L2I4XDK0El3erZxl5tbnd4t2SGqPhw7exY f8p8ks+QnZXsKxYUSi72QII3KE/qBPwYAPCIpp/S9Hk9fm9hlY4jCfo7x Q=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe03.verizonbusiness.com with ESMTP; 24 Sep 2017 18:45:10 +0000 From: "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2017 18:45:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278709; x=1537814709; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys/SH9t+UZZg6XH6nC4RpJYN1sWalwh4lHvIM4LaTSQ=; b=mulr3Csz8GFscUqwfQthkW/2YQlQ07W7aqHxd+gjzhAjSj+DmcuRly3R XDNIpVnRawR8cjxSiEKfkcowHXMsG7CqdxBCr0djyaC38cMXhXXNOMfjr d/8TuAbbLwt4t6ncnOwkZ+y/P8x7h4Uotnf9EikATHv+cuWYpGMzhck6V 0=; 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; 24 Sep 2017 14:45:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278710; x=1537814710; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys/SH9t+UZZg6XH6nC4RpJYN1sWalwh4lHvIM4LaTSQ=; b=DKyvzYzSpptzrnXhoxugdhzxYft9/kRHwV3/k+nRkDiDib0dMASTQBGT iLbsHzIWXFKtUxDCzXRJZUF9VFktBJCQZagZgEznjYqLjBT2cqGWL5Izj gswAzEiwE5CUsGChszUvLr+GE5Our+5P5TCuF3gcYqdBQHAaZPQXJ09Vq Q=; 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; 24 Sep 2017 18:45:10 +0000 Received: from scwexch26apd.uswin.ad.vzwcorp.com (153.114.130.45) by CASAC1EXH003.uswin.ad.vzwcorp.com (10.11.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 24 Sep 2017 11:45:09 -0700 Received: from OMZP1LUMXCA11.uswin.ad.vzwcorp.com (144.8.22.186) by scwexch26apd.uswin.ad.vzwcorp.com (153.114.130.45) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 24 Sep 2017 11:45:08 -0700 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA11.uswin.ad.vzwcorp.com (144.8.22.186) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 24 Sep 2017 13:44:55 -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:44:55 -0500 To: "gregkh@linuxfoundation.org" CC: "stable@vger.kernel.org" Subject: [GIT PULL for-4.4 28/46] ASoC: dapm: fix some pointer error handling Thread-Topic: [GIT PULL for-4.4 28/46] ASoC: dapm: fix some pointer error handling Thread-Index: AQHTNWTdoQLwQ4a9l0WlUwxovgLSeQ== Date: Sun, 24 Sep 2017 18:42:25 +0000 Message-ID: <20170924184213.29599-29-alexander.levin@verizon.com> References: <20170924184213.29599-1-alexander.levin@verizon.com> In-Reply-To: <20170924184213.29599-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);