diff mbox

ASoC: alc5632: fix uninit var in alc5632_probe()

Message ID 1396290324-6334-1-git-send-email-swarren@wwwdotorg.org (mailing list archive)
State Accepted
Commit e3efe3bedb6592465d9a2bd116d5e611dae362c3
Headers show

Commit Message

Stephen Warren March 31, 2014, 6:25 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

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.

Cc: Xiubo Li <Li.Xiubo@freescale.com>
Fixes: 5d6be5aa6bec ("ASoC: codec: Simplify ASoC probe code.")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 sound/soc/codecs/alc5632.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Thierry Reding March 31, 2014, 7:43 p.m. UTC | #1
On Mon, Mar 31, 2014 at 12:25:24PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> 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.

It's also completely unused, so there's no reason to keep it:

Reviewed-by: Thierry Reding <treding@nvidia.com>
Mark Brown April 1, 2014, 11:40 a.m. UTC | #2
On Mon, Mar 31, 2014 at 12:25:24PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index ec071a6306ef..3ee8d4e41a99 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -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 */