Skip to content

Commit

Permalink
ASoC: isabelle: using an uninitialized variable
Browse files Browse the repository at this point in the history
We should set "isabelle_regmap" before using it.  GCC complains.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Jun 7, 2012
1 parent a265367 commit 4082010
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/codecs/isabelle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,15 +1126,14 @@ 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);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
ret);
return ret;
}
i2c_set_clientdata(i2c, isabelle_regmap);

ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_isabelle, isabelle_dai,
Expand Down

0 comments on commit 4082010

Please sign in to comment.