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>
This commit is contained in:
Uwe Kleine-König 2022-04-25 21:32:06 +02:00 committed by Mark Brown
parent 83f48ad508
commit 0e631e065b
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

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