Skip to contentSkip to conversation

ASoC: alc56(23|32): fix undefined return value of probing code

PATCH Applied Christoph Jaeger 2 participants 2 messages Apr 4, 2014

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

PATCH 1/1 ASoC: alc56(23|32): fix undefined return value of probing code

Commit 5d6be5aa ("ASoC: codec: Simplify ASoC probe code.") left variable 'ret', whose value is returned, uninitialized. Since it is not used otherwise, remove it.

---
 sound/soc/codecs/alc5623.c | 3 +--
 sound/soc/codecs/alc5632.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
sound/soc/codecs/alc5623.c +1 -2
index 09f7e77..f500905 100644
@@ -902,7 +902,6 @@ static int alc5623_probe(struct snd_soc_codec *codec)
 {
 	struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = &codec->dapm;
-	int ret;
 
 	alc5623_reset(codec);
 
@@ -961,7 +960,7 @@ static int alc5623_probe(struct snd_soc_codec *codec)
 		return -EINVAL;
 	}
 
-	return ret;
+	return 0;
 }
 
 /* power down chip */
sound/soc/codecs/alc5632.c +1 -2
index ec071a6..3ee8d4e 100644
@@ -1061,7 +1061,6 @@ static int alc5632_resume(struct snd_soc_codec *codec)
 static int alc5632_probe(struct snd_soc_codec *codec)
 {
 	struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec);
-	int ret;
 
 	/* power on device  */
 	alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
@@ -1075,7 +1074,7 @@ static int alc5632_probe(struct snd_soc_codec *codec)
 		return -EINVAL;
 	}
 
-	return ret;
+	return 0;
 }
 
 /* power down chip */
Signature · 1 line
1.9.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Christoph Jaeger

Commit 5d6be5aa ("ASoC: codec: Simplify ASoC probe code.") left variable 'ret', whose value is returned, uninitialized. Since it is not used otherwise, remove it.

Applied, thanks.