Commit 1a9fa954 authored by Zheyu Ma's avatar Zheyu Ma Committed by Mark Brown

ASoC: cs42l56: Fix the error handling of cs42l56_i2c_probe()

The driver should goto label 'err_enable' when failing at regmap_read().
Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220511015514.1777923-1-zheyuma97@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ed46731d
......@@ -1245,7 +1245,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client)
ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, &reg);
if (ret) {
dev_err(&i2c_client->dev, "Failed to read chip ID: %d\n", ret);
return ret;
goto err_enable;
}
devid = reg & CS42L56_CHIP_ID_MASK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment