From: Uwe Kleine-König Date: Mon, 25 Apr 2022 19:32:06 +0000 (+0200) Subject: ASoC: tas6424: Return zero in remove callback X-Git-Tag: v6.6.17~6759^2~68^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e631e065bcb92cc97b38a82e41695952145751d;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/20220425193206.61710-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c index f06d2ad..d87444e 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; }