All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tas6424: Return zero in remove callback
@ 2022-04-25 19:32 Uwe Kleine-König
  2022-04-26 17:07 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2022-04-25 19:32 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: alsa-devel, Takashi Iwai, kernel

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

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;
 }

base-commit: 3123109284176b1532874591f7c81f3837bbdc17
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: tas6424: Return zero in remove callback
  2022-04-25 19:32 [PATCH] ASoC: tas6424: Return zero in remove callback Uwe Kleine-König
@ 2022-04-26 17:07 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-04-26 17:07 UTC (permalink / raw)
  To: Uwe Kleine-König, Liam Girdwood; +Cc: alsa-devel, Takashi Iwai, kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-26 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 19:32 [PATCH] ASoC: tas6424: Return zero in remove callback Uwe Kleine-König
2022-04-26 17:07 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.