From: Axel Lin Date: Sat, 19 Nov 2011 02:15:53 +0000 (+0800) Subject: ASoC: cs42l73: Return proper error code if device id mismatch X-Git-Tag: Ubuntu-5.13.0-19.19~25459^2~334 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ea0756158110fef07b2f2975e38890cecde6a1ce;p=mirror_ubuntu-jammy-kernel.git ASoC: cs42l73: Return proper error code if device id mismatch Return -ENODEV instead of 0 if device id mismatch. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 6fe259aceb7b..fdd8aa207730 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1369,6 +1369,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);