ASoC: isabelle: using an uninitialized variable
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Jun 2012 12:38:37 +0000 (15:38 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 7 Jun 2012 22:58:44 +0000 (06:58 +0800)
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>
sound/soc/codecs/isabelle.c

index bcc77ef0eda2f8aa9fbc0436d2428071b07690fa..0d62f3b0f47479927614771b606790f657e60961 100644 (file)
@@ -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,