Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1156632imm; Wed, 26 Sep 2018 12:39:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV62urQIaqSoyNJ+JqMKZmcWDuHyIBlyTM189kgXn6NJoRJ1zsxYkNNR4KrEoXVlcPo/y54hV X-Received: by 2002:a65:654d:: with SMTP id a13-v6mr6902057pgw.35.1537990763183; Wed, 26 Sep 2018 12:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537990763; cv=none; d=google.com; s=arc-20160816; b=CFEDCiv6Ruy5fOWY8OvPVqWayud950eP8dMEpKHd0A4/jRUcuko2WyXgdA0PbNq35U Ou0nUrObNLKoBzD3bAwaFcLQMDVuYE3OA+XPLrwVIKRvbQPSaQs/mW+g2Vu6FXkZNQUU bSRo95Q4zWrqHiQMexr/MgL+4C95kPwxVgVeEJ15DFJAtCA1UhLJJWX2lYPetjcQDkh8 aARP+YrE48qPvYoU0fBVt3wERU32zd9BdvyST/WQ2rgbeZ1EQfWoRsyXJbxWpkKYo+ET vmrpSqG6AfSEBL3f8rn9lq4MUSm4Q7c9FOpPgVY7lt72I6kVhO/VmxVegM+zgzGZuvGU lBDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=RunRvA1jYAlEV6dw6OSlZY6MntvIyBhmEIPZL9HaSIM=; b=ClupJpW3a6OHEt4YRdLNgDEe8x64pWdCaWhiBM4CUk+CMm8QtskDSsDuYsEz9pOb5L 2P+mGaXECUysCDZ+1TnMWzqPz8m+x8q7tBJsku8gYbYesDSnUbkxxOhkew/6hUjFKPed XHOlI8KhsxAduPdP3ezyFLSvwjlul1kJRXSMXeNU8i2++SrJSjze4Qq/kkyNalJUrQmX UOgf7S4ls4jgb40G6fD4aQqBL6Eqb3eId/v+a3gkizG9DjKc4Bw0fi8rE6PTCjSdevpf JYsZFNeQt2V26hX7lecd9ATl9JPH2D+03RkbNcxRjBtXd59rDXkvOudhzAeKd7Afd4Ze 6Ysg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si5978691plb.44.2018.09.26.12.39.07; Wed, 26 Sep 2018 12:39:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726544AbeI0BxY (ORCPT + 99 others); Wed, 26 Sep 2018 21:53:24 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:47689 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbeI0BxY (ORCPT ); Wed, 26 Sep 2018 21:53:24 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MMoOy-1gNsyj1pIa-00ImP7; Wed, 26 Sep 2018 21:37:53 +0200 From: Arnd Bergmann To: Mark Brown Cc: Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Marcel Ziswiler , Kuninori Morimoto , Robert Jarzmik , Fabio Estevam , patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: wm9712: fix unused variable warning Date: Wed, 26 Sep 2018 21:37:40 +0200 Message-Id: <20180926193750.2468414-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:ta/u0qgWp0cmBz/Syz+o2PFf8tnus0PbJDhOwnfrQ2MQVvO0EWE IEuLWswjfu3lv10DsFfnijVua6FQvTbrLLxJ/3E9F6sxr4+uyqRYm10YiMJqNzNsyruwHjK iGHsq1PJlSkHJlkmck7x6RbBbT0y+ZISjb5ncTpuWV97d9yEYbSnd1dp2ZMYjZb82eqGMTe b8cQPiJcPbD7MX6q+oUPw== X-UI-Out-Filterresults: notjunk:1;V01:K0:I89YepxwDdw=:Rn2dZ4ApVZBRng68itqPrb zqq0gmfPzQ61jJfHXEF0gUYJ9DNi1MoxAkCr5wKE3MWGKrNbQwj/EP1MbgIyD+RKdE8ApLood DSiAXqvWao9gakxyed4HpJJtTsnbEaWATk/g7SYikuTdLgiiPv8dLrOv8CaN7z9zzeiEOliYC pcfiPjg1gZgllv1zZP7sL34GRbXHxHVieZWil2/FvMIqaAvy6dWla3yDt8207Qd7hXQVvwJT/ Sq1Nr5oMxzk3u5Ca4c8FpwzuUlXMOQ4uzlPi3rVofbX9yPxmtL8FjcfNkn0FVf2Cmza4nnYeo AzeBa6qnGuNaHpWzv4pDkcyz1ThFneAO7s18jRp8n5hH0HWoUo1BwXzgSvsByYPGs+SogVMKu AaAhokwoD0RRd/SORTVl6VjkHRCDOcuWSIKOuni/b5EWSwFZeug0Q9ZJfq3EEVFnsTLL4RDZt WDRSjpLX/pWE6dKb8ApeZ5bc40rymkGVUPWbuh7GDRWFicnCYV5C7JESaRiotf5+yfJZXZe3s IKLjFmu8Oo6haie0ICVpxS2WdRYojalqDSubP6DNciteTvVzsg7Y5/Vpv8NUvyFAuJ9eppbnQ 0z5TF1dCfz/kLVTZPaWVWBva9c7dx/r/w8uN8X74/stG2PZR8jf2hkLaIBmZ94s4T3qkTSNEk X0qdL7+eqGATreqOSpWBqOtUAAs6QhTuslgVyZNQWqvOcB54/Q0OK1XGQL1CRFevwBU4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'ret' variable is now only used in an #ifdef, and causes a warning if it is declared outside of that block: sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe': sound/soc/codecs/wm9712.c:641:6: error: unused variable 'ret' [-Werror=unused-variable] Fixes: 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support") Signed-off-by: Arnd Bergmann --- sound/soc/codecs/wm9712.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index ade34c26ad2f..e873baa9e778 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -638,13 +638,14 @@ static int wm9712_soc_probe(struct snd_soc_component *component) { struct wm9712_priv *wm9712 = snd_soc_component_get_drvdata(component); struct regmap *regmap; - int ret; if (wm9712->mfd_pdata) { wm9712->ac97 = wm9712->mfd_pdata->ac97; regmap = wm9712->mfd_pdata->regmap; } else { #ifdef CONFIG_SND_SOC_AC97_BUS + int ret; + wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID, WM9712_VENDOR_ID_MASK); if (IS_ERR(wm9712->ac97)) { -- 2.18.0