ASoC: ak4642: Add default return value in ak4642_modinit
authorKuninori Morimoto <morimoto.kuninori@renesas.com>
Tue, 15 Dec 2009 06:54:21 +0000 (15:54 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 15 Dec 2009 14:54:01 +0000 (14:54 +0000)
If ak4642 driver was compiled without I2C configs,
ak4642_modinit return value will become un-stable.
This patch modify this bug

Reported-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/ak4642.c

index b69861d521610d9c4ba16ec7e4d8542202e798fc..3ef16bbc8c8397a3e808f63901c12fddd3135ad8 100644 (file)
@@ -470,7 +470,7 @@ EXPORT_SYMBOL_GPL(soc_codec_dev_ak4642);
 
 static int __init ak4642_modinit(void)
 {
-       int ret;
+       int ret = 0;
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
        ret = i2c_add_driver(&ak4642_i2c_driver);
 #endif