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

The driver should goto label 'err_enable' when failing at regmap_read().

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-2-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Zheyu Ma 2022-05-10 23:32:46 +08:00 committed by Mark Brown
parent 83d1b65d4c
commit c1ce4ba502
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;