Skip to contentSkip to conversation

ASoC: rk817: fix compile warning in rk817_probe()

PATCH In review Yang Yingliang 2 participants 2 messages Jun 3, 2021 – Jun 4, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rk817: fix compile warning in rk817_probe()

Fix the compile warning by return ret:

sound/soc/codecs/rk817_codec.c:418:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

    418 |  int ret;
        |      ^~~
---
 sound/soc/codecs/rk817_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rk817_codec.c +1 -1
index 17e672b85ee5..56de5ec5f03b 100644
@@ -430,7 +430,7 @@ static int rk817_probe(struct snd_soc_component *component)
 
 	snd_soc_component_set_pll(component, 0, 0, 0, 0);
 
-	return 0;
+	return ret;
 }
 
 static void rk817_remove(struct snd_soc_component *component)
Signature · 1 line
2.25.1
#1 lore raw
Quoted 28 lines · Yang Yingliang

Fix the compile warning by return ret:

sound/soc/codecs/rk817_codec.c:418:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

    418 |  int ret;
        |      ^~~
---
 sound/soc/codecs/rk817_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rk817_codec.c +1 -1
index 17e672b85ee5..56de5ec5f03b 100644
@@ -430,7 +430,7 @@ static int rk817_probe(struct snd_soc_component *component)
 
 	snd_soc_component_set_pll(component, 0, 0, 0, 0);
 
-	return 0;
+	return ret;
 }
 
 static void rk817_remove(struct snd_soc_component *component)
Signature · 1 line
2.25.1

This should be fixed by
ef7570b67541 ASoC: rk817: fix a warning in rk817_probe()

https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?h=tb-mfd-asoc-5.14-1&id=ef7570b67541d8b938df1e45f56e54be70bf1360