Skip to content

Commit

Permalink
ASoC: cs35l33: fix an error code in probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 833bc4c ]

This error path returns zero (success) but it should return -EINVAL.

Fixes: 3333cb7 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/YKXuyGEzhPT35R3G@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 3, 2021
1 parent d29df5f commit 78d5f41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/codecs/cs35l33.c
Expand Up @@ -1201,6 +1201,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
dev_err(&i2c_client->dev,
"CS35L33 Device ID (%X). Expected ID %X\n",
devid, CS35L33_CHIP_ID);
ret = -EINVAL;
goto err_enable;
}

Expand Down

0 comments on commit 78d5f41

Please sign in to comment.