From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 383BDC32771 for ; Fri, 24 Jan 2020 11:01:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 050172075D for ; Fri, 24 Jan 2020 11:01:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863679; bh=KU8PfJUa6fdmlzZuEbVLvGlGX2RO86ME0LZgXXhZrqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=I9wa9WqdhN6pa3xvLQM2AQCBs07gN2ZdBUnd+1cV8cu5BDzM01yFBNsNqySyUfqT5 SLJpfKBB82/HUzJD47TMpYfz5B5vQH5h1PBDBVMzNW9QYVaHu9ctWpKvGYBCFDrBm4 jGfz73eyiFeiT/cSe0mlZdDyvNWbi57CjeRL/N2E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387599AbgAXLBP (ORCPT ); Fri, 24 Jan 2020 06:01:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:33888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730614AbgAXLBP (ORCPT ); Fri, 24 Jan 2020 06:01:15 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89C562071A; Fri, 24 Jan 2020 11:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863674; bh=KU8PfJUa6fdmlzZuEbVLvGlGX2RO86ME0LZgXXhZrqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2sRGgQHXQ0X5wa1fsHDWCjhcdqwC8vd1Qf4D3s3jeObf1YJOkHMkOnpkPvRlSEXcG C33fRVSyEmTcDIuLnyd+czEaNUF7j9c8eT+xR4ka43BIySM31NtzK3xX2GbGvAyGT+ fcu6xXO2SQCH5o1NpvpAOzEfcQZPU2qRhJ1XQdk0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 4.19 034/639] ASoC: wm9712: fix unused variable warning Date: Fri, 24 Jan 2020 10:23:24 +0100 Message-Id: <20200124093051.703049750@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 18380dcc52cc8965e5144ce33fdfad7e168679a5 ] 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 ade34c26ad2f3..e873baa9e7780 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.20.1