aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheyu Ma <[email protected]>2022-05-10 23:32:46 +0800
committerMark Brown <[email protected]>2022-05-11 17:40:18 +0100
commitc1ce4ba5021a9730c00bab6f8122702deb69d37e (patch)
tree82761eb82b7806ef30260d818d9a9b176a80eb62
parent83d1b65d4cbe6fb0bbdacc18c1f4ad0450275d8f (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/cs42l56.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index 2c4e09b43199..dc23007336c5 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -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;