From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
kernel-janitors@vger.kernel.org,
Vishwas A Deshpande <vishwas.a.deshpande@ti.com>,
M R Swami Reddy <mr.swami.reddy@ti.com>
Subject: [patch] ASoC: isabelle: using an uninitialized variable
Date: Thu, 7 Jun 2012 15:38:37 +0300 [thread overview]
Message-ID: <20120607123837.GA7171@elgon.mountain> (raw)
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,
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
kernel-janitors@vger.kernel.org,
Vishwas A Deshpande <vishwas.a.deshpande@ti.com>,
M R Swami Reddy <mr.swami.reddy@ti.com>
Subject: [patch] ASoC: isabelle: using an uninitialized variable
Date: Thu, 07 Jun 2012 12:38:37 +0000 [thread overview]
Message-ID: <20120607123837.GA7171@elgon.mountain> (raw)
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,
next reply other threads:[~2012-06-07 12:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 12:38 Dan Carpenter [this message]
2012-06-07 12:38 ` [patch] ASoC: isabelle: using an uninitialized variable Dan Carpenter
2012-06-07 22:59 ` Mark Brown
2012-06-07 22:59 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120607123837.GA7171@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lrg@ti.com \
--cc=mr.swami.reddy@ti.com \
--cc=tiwai@suse.de \
--cc=vishwas.a.deshpande@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.