kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ASoC: isabelle: using an uninitialized variable
@ 2012-06-07 12:38 Dan Carpenter
  2012-06-07 22:59 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-06-07 12:38 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: alsa-devel, Takashi Iwai, Mark Brown, kernel-janitors,
	Vishwas A Deshpande, M R Swami Reddy

We should set "isabelle_regmap" before using it.  GCC complains.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c
index bcc77ef..0d62f3b 100644
--- a/sound/soc/codecs/isabelle.c
+++ b/sound/soc/codecs/isabelle.c
@@ -1126,8 +1126,6 @@ static int __devinit isabelle_i2c_probe(struct i2c_client *i2c,
 	struct regmap *isabelle_regmap;
 	int ret = 0;
 
-	i2c_set_clientdata(i2c, isabelle_regmap);
-
 	isabelle_regmap = devm_regmap_init_i2c(i2c, &isabelle_regmap_config);
 	if (IS_ERR(isabelle_regmap)) {
 		ret = PTR_ERR(isabelle_regmap);
@@ -1135,6 +1133,7 @@ static int __devinit isabelle_i2c_probe(struct i2c_client *i2c,
 			ret);
 		return ret;
 	}
+	i2c_set_clientdata(i2c, isabelle_regmap);
 
 	ret =  snd_soc_register_codec(&i2c->dev,
 				&soc_codec_dev_isabelle, isabelle_dai,

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

* Re: [patch] ASoC: isabelle: using an uninitialized variable
  2012-06-07 12:38 [patch] ASoC: isabelle: using an uninitialized variable Dan Carpenter
@ 2012-06-07 22:59 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-06-07 22:59 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: alsa-devel, Takashi Iwai, kernel-janitors, Vishwas A Deshpande,
	M R Swami Reddy, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

On Thu, Jun 07, 2012 at 03:38:37PM +0300, Dan Carpenter wrote:
> We should set "isabelle_regmap" before using it.  GCC complains.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks.

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

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

end of thread, other threads:[~2012-06-07 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 12:38 [patch] ASoC: isabelle: using an uninitialized variable Dan Carpenter
2012-06-07 22:59 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).