diff options
author | Zheyu Ma <zheyuma97@gmail.com> | 2022-05-10 23:32:47 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-05-11 17:40:13 +0100 |
commit | cf7250e95d309ae518918613fb904a4565ffc85d (patch) | |
tree | 20db18b8e750b93f6ea68bb5d52ba068e4c3a422 /sound/soc/codecs/cs35l36.c | |
parent | 71013db522a90513e4e4ec3b33eb00c939e2f4b3 (diff) |
ASoC: cs35l36: Fix the error handling of cs35l36_i2c_probe()
The driver should goto label 'err' 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/20220510153251.1741210-3-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs35l36.c')
-rw-r--r-- | sound/soc/codecs/cs35l36.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index cc5e80222916..920190daa4d1 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -1803,7 +1803,7 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client) if (ret < 0) { dev_err(&i2c_client->dev, "Failed to read otp_id Register %d\n", ret); - return ret; + goto err; } if ((l37_id_reg & CS35L36_OTP_REV_MASK) == CS35L36_OTP_REV_L37) |