Commit cf7250e9 authored by Zheyu Ma's avatar Zheyu Ma Committed by Mark Brown

ASoC: cs35l36: Fix the error handling of cs35l36_i2c_probe()

The driver should goto label 'err' when failing at regmap_read().
Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-3-zheyuma97@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 71013db5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment