Skip to contentSkip to conversation

ASoC: codec: remove unused variable

PATCH In review Jiapeng Chong 2 participants 2 messages Apr 14, 2021

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

PATCH 1/1 ASoC: codec: remove unused variable

Fix the following gcc warning:

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

---
 sound/soc/codecs/jz4760.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/codecs/jz4760.c +1 -3
index e8f28cc..ad5e859 100644
@@ -198,15 +198,13 @@ static int jz4760_codec_startup(struct snd_pcm_substream *substream,
 {
 	struct snd_soc_component *codec = dai->component;
 	struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(codec);
-	int ret;
-
 	/*
 	 * SYSCLK output from the codec to the AIC is required to keep the
 	 * DMA transfer going during playback when all audible outputs have
 	 * been disabled.
 	 */
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		ret = snd_soc_dapm_force_enable_pin(dapm, "SYSCLK");
+		snd_soc_dapm_force_enable_pin(dapm, "SYSCLK");
 	return 0;
 }
 
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 4 lines · Jiapeng Chong

Fix the following gcc warning:

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

This doesn't apply against current code, please check and resend.