diff mbox series

ASoC: cs35l33: fix an error code in probe()

Message ID YKXuyGEzhPT35R3G@mwanda (mailing list archive)
State Accepted
Commit 833bc4cf9754643acc69b3c6b65988ca78df4460
Headers show
Series ASoC: cs35l33: fix an error code in probe() | expand

Commit Message

Dan Carpenter May 20, 2021, 5:08 a.m. UTC
This error path returns zero (success) but it should return -EINVAL.

Fixes: 3333cb7187b9 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/soc/codecs/cs35l33.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Charles Keepax May 20, 2021, 9:12 a.m. UTC | #1
On Thu, May 20, 2021 at 08:08:24AM +0300, Dan Carpenter wrote:
> This error path returns zero (success) but it should return -EINVAL.
> 
> Fixes: 3333cb7187b9 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Good spot dude, sorry I missed that one in my recent fix ups.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles
Mark Brown May 20, 2021, 9:08 p.m. UTC | #2
On Thu, 20 May 2021 08:08:24 +0300, Dan Carpenter wrote:
> This error path returns zero (success) but it should return -EINVAL.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs35l33: fix an error code in probe()
      commit: 833bc4cf9754643acc69b3c6b65988ca78df4460

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 6f6b3c0c88b7..2a6f5e46d031 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -1202,6 +1202,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;
 	}