diff mbox series

ASoC: tas6424: Return zero in remove callback

Message ID 20220425193206.61710-1-u.kleine-koenig@pengutronix.de
State Accepted
Commit 0e631e065bcb92cc97b38a82e41695952145751d
Headers show
Series ASoC: tas6424: Return zero in remove callback | expand

Commit Message

Uwe Kleine-König April 25, 2022, 7:32 p.m. UTC
The only effect of returning an error code in an i2c remove callback
(compared to returning zero) is that the i2c core emits a generic
warning. The device is still removed.

So even if disabling the regulators fails it's sensible to return zero
to suppress the additional generic and little helpful error message.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 sound/soc/codecs/tas6424.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)


base-commit: 3123109284176b1532874591f7c81f3837bbdc17

Comments

Mark Brown April 26, 2022, 5:07 p.m. UTC | #1
On Mon, 25 Apr 2022 21:32:06 +0200, Uwe Kleine-König wrote:
> The only effect of returning an error code in an i2c remove callback
> (compared to returning zero) is that the i2c core emits a generic
> warning. The device is still removed.
> 
> So even if disabling the regulators fails it's sensible to return zero
> to suppress the additional generic and little helpful error message.
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: tas6424: Return zero in remove callback
      commit: 0e631e065bcb92cc97b38a82e41695952145751d

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/tas6424.c b/sound/soc/codecs/tas6424.c
index 59543d392110..8b587c4e6c97 100644
--- a/sound/soc/codecs/tas6424.c
+++ b/sound/soc/codecs/tas6424.c
@@ -786,10 +786,8 @@  static int tas6424_i2c_remove(struct i2c_client *client)
 
 	ret = regulator_bulk_disable(ARRAY_SIZE(tas6424->supplies),
 				     tas6424->supplies);
-	if (ret < 0) {
+	if (ret < 0)
 		dev_err(dev, "unable to disable supplies: %d\n", ret);
-		return ret;
-	}
 
 	return 0;
 }