diff options
author | Zheyu Ma <zheyuma97@gmail.com> | 2022-05-11 04:55:14 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-05-11 19:42:12 +0300 |
commit | 1a9fa95447bba1704b7d701ad08988e15b28aba6 (patch) | |
tree | 216128ee044fd16454cb22d6a79557b7cefd932a | |
parent | ed46731d8e86c8d65f5fc717671e1f1f6c3146d2 (diff) | |
download | linux-1a9fa95447bba1704b7d701ad08988e15b28aba6.tar.xz |
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: Zheyu Ma <zheyuma97@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220511015514.1777923-1-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/cs42l56.c | 2 |
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, ®); 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; |