浏览代码

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

Return -ENODEV instead of 0 if device id mismatch.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin 13 年之前
父节点
当前提交
ea07561581
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/soc/codecs/cs42l73.c

+ 1 - 0
sound/soc/codecs/cs42l73.c

@@ -1369,6 +1369,7 @@ static __devinit int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 
 
 
 
 	if (devid != CS42L73_DEVID) {
 	if (devid != CS42L73_DEVID) {
+		ret = -ENODEV;
 		dev_err(&i2c_client->dev,
 		dev_err(&i2c_client->dev,
 			"CS42L73 Device ID (%X). Expected %X\n",
 			"CS42L73 Device ID (%X). Expected %X\n",
 			devid, CS42L73_DEVID);
 			devid, CS42L73_DEVID);