From: Yauhen Kharuzhy Date: Wed, 11 Feb 2026 00:18:36 +0000 (+0200) Subject: ASoC: rt5677: Report error if the ID register cannot be read X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14848e6a8058916e9b008734aa36da989725b6df;p=thirdparty%2Flinux.git ASoC: rt5677: Report error if the ID register cannot be read To make error messages clearer, report if the ID register failed to be read via I2C during probing. Signed-off-by: Yauhen Kharuzhy Link: https://patch.msgid.link/20260211002255.4090440-5-jekhor@gmail.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 6628c7ca5a8a8..845385c1fb88b 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -5602,7 +5602,13 @@ static int rt5677_i2c_probe(struct i2c_client *i2c) return ret; } - regmap_read(rt5677->regmap, RT5677_VENDOR_ID2, &val); + ret = regmap_read(rt5677->regmap, RT5677_VENDOR_ID2, &val); + if (ret) { + dev_err(&i2c->dev, + "Failed to read ID register: %d\n", ret); + return -ENODEV; + } + if (val != RT5677_DEVICE_ID) { dev_err(&i2c->dev, "Device with ID register %#x is not rt5677\n", val);