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>
This commit is contained in:
Zheyu Ma 2022-05-10 23:32:47 +08:00 committed by Mark Brown
parent 71013db522
commit cf7250e95d
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

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