mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: wm9712: fix unused variable warning
[ Upstream commit18380dcc52] 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:2ed1a8e0ce("ASoC: wm9712: add ac97 new bus support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bce5c4c303
commit
08e7931218
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user