summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/uda1380.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-04 12:35:20 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-05 00:47:15 +0100
commitef1497707c69f3805bbca97c5d10c2913b6d2fa1 (patch)
tree4ca9308a54f26182ead04a136613a36528c34558 /sound/soc/codecs/uda1380.c
parentASoC: kirkwood: Make SND_KIRKWOOD_SOC_OPENRD and SND_KIRKWOOD_SOC_T5325 depen... (diff)
downloadlinux-ef1497707c69f3805bbca97c5d10c2913b6d2fa1.tar.xz
linux-ef1497707c69f3805bbca97c5d10c2913b6d2fa1.zip
ASoC: uda1380: Return proper error in uda1380_modinit failure path
Return proper error for uda1380_modinit if i2c_add_driver() fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r--sound/soc/codecs/uda1380.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index c5ca8cfea60f..0441893e270e 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -863,13 +863,13 @@ static struct i2c_driver uda1380_i2c_driver = {
static int __init uda1380_modinit(void)
{
- int ret;
+ int ret = 0;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
ret = i2c_add_driver(&uda1380_i2c_driver);
if (ret != 0)
pr_err("Failed to register UDA1380 I2C driver: %d\n", ret);
#endif
- return 0;
+ return ret;
}
module_init(uda1380_modinit);