]> git.baikalelectronics.ru Git - kernel.git/commit
leds: lm3601x: Improve error reporting for problems during .remove()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 15 Aug 2022 08:02:28 +0000 (10:02 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 16 Aug 2022 10:34:04 +0000 (12:34 +0200)
commita541fc1f9722164ac3523fdcac401b76216fe089
treee46f721f51346f518d471aad33ec90c4a43f30b6
parent4df2f93931d4c1a0bc1e8d5b2dd7fbe2f861636b
leds: lm3601x: Improve error reporting for problems during .remove()

Returning an error value in an i2c remove callback results in a generic
error message being emitted by the i2c core, but otherwise it doesn't
make a difference. The device goes away anyhow and the devm cleanups are
called.

So instead of triggering the generic i2c error message, emit a more
helpful message if a problem occurs and return 0 to suppress the generic
message.

This patch is a preparation for making i2c remove callbacks return void.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/leds/flash/leds-lm3601x.c