Skip to contentSkip to conversation

ASoC: cs42l73: Return proper error code if device id mismatch

PATCH Applied Axel Lin 2 participants 4 messages Nov 19, 2011 – Nov 21, 2011

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 ASoC: cs42l73: Return proper error code if device id mismatch

Return -ENODEV instead of 0 if device id mismatch.

---
 sound/soc/codecs/cs42l73.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/cs42l73.c +1 -0
index aadfd6b..3eed21e 100644
@@ -1370,6 +1370,7 @@ static __devinit int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 
 
 	if (devid != CS42L73_DEVID) {
+		ret = -ENODEV;
 		dev_err(&i2c_client->dev,
 			"CS42L73 Device ID (%X). Expected %X\n",
 			devid, CS42L73_DEVID);
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/2 ASoC: cs42l73: Show correct revision id

---
 sound/soc/codecs/cs42l73.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/cs42l73.c +1 -1
index 3eed21e..066d869 100644
@@ -1384,7 +1384,7 @@ static __devinit int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	}
 
 	dev_info(&i2c_client->dev,
-		 "Cirrus Logic CS42L73, Revision: %02X\n", ret & 0xFF);
+		 "Cirrus Logic CS42L73, Revision: %02X\n", reg & 0xFF);
 
 	regcache_cache_only(cs42l73->regmap, true);
 
Signature · 1 line
1.7.5.4