Skip to content

Commit a915dfd

Browse files
Uwe Kleine-Königsre
authored andcommitted
power: supply: max77650: Make max77650_charger_disable() return void
The return value of max77650_charger_disable() is ignored by all but one caller. That one caller propagates the error code in the platform driver's remove function. The only effect of that is that the driver core emits a generic error message (but still removes the device). As max77650_charger_disable() already emits an error message, this can better be changed to return zero. This is a preparation for making struct platform_driver::remove return void, too. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent eedb923 commit a915dfd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/power/supply/max77650-charger.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int max77650_charger_enable(struct max77650_charger_data *chg)
141141
return rv;
142142
}
143143

144-
static int max77650_charger_disable(struct max77650_charger_data *chg)
144+
static void max77650_charger_disable(struct max77650_charger_data *chg)
145145
{
146146
int rv;
147147

@@ -151,8 +151,6 @@ static int max77650_charger_disable(struct max77650_charger_data *chg)
151151
MAX77650_CHARGER_DISABLED);
152152
if (rv)
153153
dev_err(chg->dev, "unable to disable the charger: %d\n", rv);
154-
155-
return rv;
156154
}
157155

158156
static irqreturn_t max77650_charger_check_status(int irq, void *data)
@@ -351,7 +349,9 @@ static int max77650_charger_remove(struct platform_device *pdev)
351349
{
352350
struct max77650_charger_data *chg = platform_get_drvdata(pdev);
353351

354-
return max77650_charger_disable(chg);
352+
max77650_charger_disable(chg);
353+
354+
return 0;
355355
}
356356

357357
static const struct of_device_id max77650_charger_of_match[] = {

0 commit comments

Comments
 (0)