power: supply: rt9455: Don't pass an error code in remove callback
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 5 Feb 2022 18:35:12 +0000 (19:35 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 18:52:56 +0000 (19:52 +0100)
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>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/rt9455_charger.c

index 594bb3b..74ee543 100644 (file)
@@ -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[] = {