summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-08-04 16:31:13 +0100
committerMark Brown <broonie@linaro.org>2014-08-04 16:31:13 +0100
commit7c0815289113167bee2da337afa6b34e3077e4f5 (patch)
tree1514f64c306c6132dc238eb9a8940ad803d0defb
parent3674b710a787bd3d9aea6497e134740bedcde79a (diff)
parenta72d2abbe5752f3a773c4d8b7b41ae41f617f772 (diff)
downloadlinux-7c0815289113167bee2da337afa6b34e3077e4f5.tar.gz
Merge remote-tracking branch 'asoc/fix/tlv320aic31xx' into asoc-linus
-rw-r--r--sound/soc/codecs/tlv320aic31xx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 23419109ecac..1cdae8ccc61b 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1178,7 +1178,7 @@ static void aic31xx_pdata_from_of(struct aic31xx_priv *aic31xx)
 }
 #endif /* CONFIG_OF */
 
-static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
+static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
 {
 	int ret, i;
 
@@ -1197,7 +1197,7 @@ static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
 					    "aic31xx-reset-pin");
 		if (ret < 0) {
 			dev_err(aic31xx->dev, "not able to acquire gpio\n");
-			return;
+			return ret;
 		}
 	}
 
@@ -1210,6 +1210,7 @@ static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
 	if (ret != 0)
 		dev_err(aic31xx->dev, "Failed to request supplies: %d\n", ret);
 
+	return ret;
 }
 
 static int aic31xx_i2c_probe(struct i2c_client *i2c,
@@ -1239,7 +1240,9 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c,
 
 	aic31xx->pdata.codec_type = id->driver_data;
 
-	aic31xx_device_init(aic31xx);
+	ret = aic31xx_device_init(aic31xx);
+	if (ret)
+		return ret;
 
 	return snd_soc_register_codec(&i2c->dev, &soc_codec_driver_aic31xx,
 				     aic31xx_dai_driver,