Skip to content

Commit

Permalink
ASoC: alc5632: fix uninit var in alc5632_probe()
Browse files Browse the repository at this point in the history
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: 5d6be5a ("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>
  • Loading branch information
Stephen Warren authored and Mark Brown committed Apr 1, 2014
1 parent c159a85 commit e3efe3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/codecs/alc5632.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -1075,7 +1074,7 @@ static int alc5632_probe(struct snd_soc_codec *codec)
return -EINVAL;
}

return ret;
return 0;
}

/* power down chip */
Expand Down

0 comments on commit e3efe3b

Please sign in to comment.