Skip to contentSkip to conversation

ASoC: wm8995: Return -EINVAL if device ID mismatch

PATCH Applied Axel Lin 3 participants 4 messages Sep 16, 2011

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 ASoC: wm8995: Return -EINVAL if device ID mismatch

---
 sound/soc/codecs/wm8995.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8995.c +1 -0
index 5ad873f..05f7795 100644
@@ -1642,6 +1642,7 @@ static int wm8995_probe(struct snd_soc_codec *codec)
 
 	if (ret != 0x8995) {
 		dev_err(codec->dev, "Invalid device ID: %#x\n", ret);
+		ret = -EINVAL;
 		goto err_reg_enable;
 	}
 
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 2/2 ASoC: wm8995: Remove unused i2c variable in wm8995_remove()

---
 sound/soc/codecs/wm8995.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8995.c +0 -2
index 05f7795..74ae599 100644
@@ -1573,9 +1573,7 @@ static int wm8995_resume(struct snd_soc_codec *codec)
 static int wm8995_remove(struct snd_soc_codec *codec)
 {
 	struct wm8995_priv *wm8995;
-	struct i2c_client *i2c;
 
-	i2c = container_of(codec->dev, struct i2c_client, dev);
 	wm8995 = snd_soc_codec_get_drvdata(codec);
 	wm8995_set_bias_level(codec, SND_SOC_BIAS_OFF);
 	return 0;
Signature · 1 line
1.7.4.1
Acked-by on v1 1/2
#2 lore raw
In reply to Axel Lin
Quoted 10 lines · Axel Lin
---
 sound/soc/codecs/wm8995.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8995.c +0 -0
index 5ad873f..05f7795 100644

sound/soc/codecs/wm8995.c static int wm8995_probe(struct snd_soc_codec *codec) · line 1648

Quoted 7 lines
sound/soc/codecs/wm8995.c +1 -0
@@ -1642,6 +1642,7 @@ static int wm8995_probe(struct snd_soc_codec *codec)
 
 	if (ret != 0x8995) {
 		dev_err(codec->dev, "Invalid device ID: %#x\n", ret);
+		ret = -EINVAL;
 		goto err_reg_enable;
 	}
 

Both