Message ID | 20220205183512.11038-1-u.kleine-koenig@pengutronix.de |
---|---|
State | Accepted |
Commit | e83c7204f185c598b5b933ea5511b062b26afb67 |
Headers | show |
Series | power: supply: rt9455: Don't pass an error code in remove callback | expand |
Hi, On Sat, Feb 05, 2022 at 07:35:12PM +0100, Uwe Kleine-König wrote: > When ret is not zero there were already one or two error messages emitted > about a problem (because rt9455_register_reset() emits a message in most > cases then). Passing on that error code to the i2c core only results in > another error message. Suppress that by returning zero unconditionally. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- Thanks, queued. -- Sebastian > drivers/power/supply/rt9455_charger.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c > index 594bb3b8a4d1..74ee54320e6a 100644 > --- a/drivers/power/supply/rt9455_charger.c > +++ b/drivers/power/supply/rt9455_charger.c > @@ -1716,7 +1716,7 @@ static int rt9455_remove(struct i2c_client *client) > cancel_delayed_work_sync(&info->max_charging_time_work); > cancel_delayed_work_sync(&info->batt_presence_work); > > - return ret; > + return 0; > } > > static const struct i2c_device_id rt9455_i2c_id_table[] = { > > base-commit: dcb85f85fa6f142aae1fe86f399d4503d49f2b60 > -- > 2.34.1 >
diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c index 594bb3b8a4d1..74ee54320e6a 100644 --- a/drivers/power/supply/rt9455_charger.c +++ b/drivers/power/supply/rt9455_charger.c @@ -1716,7 +1716,7 @@ static int rt9455_remove(struct i2c_client *client) cancel_delayed_work_sync(&info->max_charging_time_work); cancel_delayed_work_sync(&info->batt_presence_work); - return ret; + return 0; } static const struct i2c_device_id rt9455_i2c_id_table[] = {
When ret is not zero there were already one or two error messages emitted about a problem (because rt9455_register_reset() emits a message in most cases then). Passing on that error code to the i2c core only results in another error message. Suppress that by returning zero unconditionally. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/power/supply/rt9455_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: dcb85f85fa6f142aae1fe86f399d4503d49f2b60