ASoC: alc5632: fix uninit var in alc5632_probe()
authorStephen Warren <swarren@nvidia.com>
Mon, 31 Mar 2014 18:25:24 +0000 (12:25 -0600)
committerMark Brown <broonie@linaro.org>
Tue, 1 Apr 2014 11:39:26 +0000 (12:39 +0100)
alc5632_probe() returns ret, yet it is not initialized or set anywhere.
This ends up causing the function to appear to fail, and audio not to
work on the Toshiba AC100, with my compiler at least.

This function used to set ret in all cases, but recent cleanup removed
that.

Fixes: 5d6be5aa6bec ("ASoC: codec: Simplify ASoC probe code.")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/alc5632.c

index ec071a6306ef567fb37b8c97981b64d1b3390f9e..3ee8d4e41a99d45c297300031572ef2a5be74f71 100644 (file)
@@ -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 */