All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: alc5632: fix uninit var in alc5632_probe()
@ 2014-03-31 18:25 Stephen Warren
  2014-03-31 19:43 ` Thierry Reding
  2014-04-01 11:40 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Warren @ 2014-03-31 18:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: alsa-devel, Xiubo Li, Stephen Warren

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(-)

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 */
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: alc5632: fix uninit var in alc5632_probe()
  2014-03-31 18:25 [PATCH] ASoC: alc5632: fix uninit var in alc5632_probe() Stephen Warren
@ 2014-03-31 19:43 ` Thierry Reding
  2014-04-01 11:40 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2014-03-31 19:43 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Xiubo Li, alsa-devel, Mark Brown, Stephen Warren, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 523 bytes --]

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>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: alc5632: fix uninit var in alc5632_probe()
  2014-03-31 18:25 [PATCH] ASoC: alc5632: fix uninit var in alc5632_probe() Stephen Warren
  2014-03-31 19:43 ` Thierry Reding
@ 2014-04-01 11:40 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-04-01 11:40 UTC (permalink / raw)
  To: Stephen Warren; +Cc: alsa-devel, Xiubo Li, Stephen Warren, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 339 bytes --]

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.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-01 11:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31 18:25 [PATCH] ASoC: alc5632: fix uninit var in alc5632_probe() Stephen Warren
2014-03-31 19:43 ` Thierry Reding
2014-04-01 11:40 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.