aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-04-25 21:32:06 +0200
committerMark Brown <broonie@kernel.org>2022-04-26 15:13:38 +0100
commit0e631e065bcb92cc97b38a82e41695952145751d (patch)
tree09982fce39e15ef0d2d63c5745658d31174cead5
parentASoC: SOF: Intel: improve HDaudio DAI support (diff)
downloadlinux-dev-0e631e065bcb92cc97b38a82e41695952145751d.tar.xz
linux-dev-0e631e065bcb92cc97b38a82e41695952145751d.zip
ASoC: tas6424: Return zero in remove callback
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> Link: https://lore.kernel.org/r/20220425193206.61710-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/tas6424.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c
index f06d2ad613f8..d87444efed37 100644
--- a/sound/soc/codecs/tas6424.c
+++ b/sound/soc/codecs/tas6424.c
@@ -785,10 +785,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;
}