i2c: Warn when device removing fails
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 26 Nov 2020 07:23:30 +0000 (08:23 +0100)
committerWolfram Sang <wsa@kernel.org>
Fri, 11 Dec 2020 14:42:19 +0000 (15:42 +0100)
commit71637c620a826434ca6f888b0364a036faa27ffa
tree530569854bc82a20f1161198d9c714fb5299ce01
parentbfbccd70eee93c059e22d0d233f57cc164f03687
i2c: Warn when device removing fails

The driver core ignores the return value of struct bus_type::remove. So
warn if there is an error that went unnoticed before and return 0
unconditionally in i2c_device_remove().

This prepares changing struct bus_type::remove to return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[wsa: added a comment and removed unneeded initializtion]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-base.c