OSDN Git Service

regulator: da9121: Emit only one error message in .remove()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 16 Nov 2021 11:09:51 +0000 (12:09 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 16 Nov 2021 14:30:01 +0000 (14:30 +0000)
commit4950486cd86f450baa847bfc13557244d834526c
tree45415c4a8eaeb09b7ef6470b9c637a707d1459ea
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
regulator: da9121: Emit only one error message in .remove()

When an i2c remove callback fails, the i2c core emits a generic error
message and still removes the device. Apart from the message there the
return value isn't further used.

So don't return an error code after having already emitted a driver
specific warning about the problem to prevent two messages about the
same issue.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211116110951.1213566-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/da9121-regulator.c