Message ID | 20171010092052.2551973-1-arnd@arndb.de |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3529988qgn; Tue, 10 Oct 2017 02:22:09 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCQ7AmIxfzdS9h4FZTPyQlky5tqBfRS+bMXk6RpU2eeCY4+Gp4ax+JkgxksZu/sXSEatZrR X-Received: by 10.223.199.138 with SMTP id l10mr1343942wrg.121.1507627329520; Tue, 10 Oct 2017 02:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507627329; cv=none; d=google.com; s=arc-20160816; b=a+ZnKpLSCTIlcGxt4trcLJfqAKnF6HkGsD6lHqq4OaP9YVsCMKMwCEgo1qKCiG+1DI Y+AwKCfZriHFE2VjFfCZfRoEpe/s5kcFcNhgCerTA6R+uZnNCN68okxC8sqlAAPtyZ5u bWaWyCkimVuYZ/wCDKVYv5OttdgGjvIQuf7BvFbAPy5PaXDnFEzpHn0HMGBRImyPCS1t EH9CzFn208hptZJqoTET/H0b8E2fXbI6ZtcrtugDodqJjcGtc520Xyc0K+wjv7IqpHsX QSGiclVHrf/m2YtXN/X2YdCuxoSn+3rKfBDDCgn3oGyKNrUNtQBfCiD9pJKlx74CuBQT AKwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from:delivered-to :arc-authentication-results; bh=2uaXjYKrdCxPhoD1I37Cz3udWpQkxkKBXkughi5SSUY=; b=PXPGfybzyJo02spSUtv+iJ3O/1Rrp7Ks7GPf725PPdJBJJrBgwrn6ePSe/0HY9XRKl F57Im17pC/rq/HQLkAhqZgv0jNyVSw3ucuyBYMSYM7aFyqYwhK5xrayo5qqpEAsyUKlF DUoAk9WRwNad8Ceoopvru9l5X9nLn8mlAmV9rltCegomr0aJbeU46du9evpBrb7+s4bh KqJ/1QebTR2nqCB939cpBDJ+OkEa7rZnCzKlAZprF+q09FiI0FB0JRPDn0MIhqGnbWQl e4q1hwIKJgZGxtYz1D+cAbyKiXrr3SoQqaE4ndJ7EcRFaa7fhqnibnesqKTsW2wN/mBa QnKA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: <alsa-devel-bounces@alsa-project.org> Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id h138si9683228wma.68.2017.10.10.02.22.09; Tue, 10 Oct 2017 02:22:09 -0700 (PDT) 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; 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 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A19332672A0; Tue, 10 Oct 2017 11:22:07 +0200 (CEST) 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 A58FD2672A7; Tue, 10 Oct 2017 11:22:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by alsa0.perex.cz (Postfix) with ESMTP id E306326727C for <alsa-devel@alsa-project.org>; Tue, 10 Oct 2017 11:22:04 +0200 (CEST) Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0Letvr-1dUTIO0ZkF-00qfEk; Tue, 10 Oct 2017 11:20:55 +0200 From: Arnd Bergmann <arnd@arndb.de> To: Mark Brown <broonie@kernel.org> Date: Tue, 10 Oct 2017 11:20:10 +0200 Message-Id: <20171010092052.2551973-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:mqMl7zQFI8PUR34PliPibOWgsJV8dl9g6+TdgVGZ3j2QL3ylLxP KkS2a5eghQ3loL3AhqM1M6O81ZvqLHtqO6cokFwe0D1pA0B5CY1Uly5HmXKY43UxJw1Xk2z Q905EP63VZrPKtGaeClod2PWHo40Uj2u6MykkAjreJIyLUJ5alm9eTh2bDPRdjTFarsFjnK ouE5QDtxD9esWV5glSvzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:swvIknmie8g=:IsKW7DxKziDyVL/YfqGox+ JJYyR93sxcVnFg+vbX0XULY5iyx6Tb1S2+Bq4pYu4iCheygMZHhT7/2vd60ax8vEo9aIcBI2o 2i52F6qs8ZLto6R/AWXeIP9ny3bMthknMdli22vbvodega4GhB0czQ2N9WFZ5QCCEp8ccTgr3 fl1UTLp+ac8i22Kq/uimbuICX7ffOAEIbCZskUSlnHA3l1YVrye8yRKQb+cfSU01QgMlPeIy5 RE5iCcykq4hJi38b+yHb9aiYx1r8i6MTRPOozdffqAiDFWtl/h6PO2M4P6jMj08rGPOLSvRIp PQbLhnP1foRzeK4PNey57VmIO/WW2EBE5Twqe8SRwEo2uQlz/VzthUNURG83gVPSiikmxDr2V I6KXu+d4J9SxfF7OWMdCfqzaBSdXIYJGEZyL9fTl6sWu/Ie/pQ7/iY7gKWXU22/aBk6pFxhjB XlzBsUyfn2gRtUigtDRdXU1cuofT4uco7oT0ky85Spec48Lsto9tMuclbXJr+bvTiU3Zlh3VP gIE3/TFb3YLr0EClC+Fw1hl9hvy7dmbQXsfZu/hdJErsfkeiQJlTejwFxliA9uy8OWf+6WBzL aQM7D+jt6sCTMysG0WoS+a+OJAuXJxKPWrKBVEik4jIxLXa722ovua22soCR+JBxFsnNmHPzD wUlD0Pic4qAxw+xQNAMoOZzP0hSakTzXGaQu5WF6bhpQTYamIov8g0nKlZFUdm2qIJ1/F9Pfh LObd1Jvtfc/0W34hFAXSvoE3cKmL8HblWq35zA== Cc: alsa-devel@alsa-project.org, Charles Keepax <ckeepax@opensource.cirrus.com>, Arnd Bergmann <arnd@arndb.de>, anish kumar <yesanishhere@gmail.com>, linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>, Liam Girdwood <lgirdwood@gmail.com> Subject: [alsa-devel] [PATCH 1/2] ASoC: dapm: add initialization for w_param_text pointer 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" <alsa-devel.alsa-project.org> List-Unsubscribe: <http://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org |
Series |
[1/2] ASoC: dapm: add initialization for w_param_text pointer
|
expand
|
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index ceec185c871f..19babdae1a06 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3905,6 +3905,8 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card, ret = -ENOMEM; goto param_fail; } + } else { + w_param_text = NULL; } dev_dbg(card->dev, "ASoC: adding %s widget\n", link_name);
We now allocate the array conditionally, but we always pass the pointer to the new snd_soc_dapm_free_kcontrol() function, which introduces a warning for the case that it is not initialized: sound/soc/soc-dapm.c: In function 'snd_soc_dapm_new_pcm': sound/soc/soc-dapm.c:3940:2: error: 'w_param_text' may be used uninitialized in this function [-Werror=maybe-uninitialized] As snd_soc_dapm_free_kcontrol() is global, it doesn't get inlined and gcc fails to notice that we don't actually access the array in that case, so the code is actually safe. Adding an initialization for the array pointer shuts up the warning. Fixes: 19ad683abc85 ("ASoC: dapm: Avoid creating kcontrol for params") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- sound/soc/soc-dapm.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel