i2c: omap: Improve error reporting for problems during .remove()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 6 Apr 2023 08:23:54 +0000 (10:23 +0200)
committerWolfram Sang <wsa@kernel.org>
Thu, 13 Apr 2023 16:47:13 +0000 (18:47 +0200)
commit9496fffcb28f39e0352779a0199b6e61861c9221
tree8a1fd5dd5d7a8f1c3cc46991fd15534da42195b9
parent0cbc9a2c62d2674b078d84e8f40445d755b94c30
i2c: omap: Improve error reporting for problems during .remove()

If pm_runtime_get() fails in .remove() the driver used to return the
error to the driver core. The only effect of this (compared to returning
zero) is a generic warning that the error value is ignored.

So emit a better warning and return zero to suppress the generic (and
little helpful) message. Also disable runtime PM in the error case.

This prepares changing platform device remove callbacks to return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-omap.c