diff mbox series

power: supply: remove unnecessary return in switch statement

Message ID 20220425084723.3495323-1-chi.minghao@zte.com.cn
State New
Headers show
Series power: supply: remove unnecessary return in switch statement | expand

Commit Message

Lv Ruyi April 25, 2022, 8:47 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

Since there's a return immediately after the 'break', there's no need for
this extra 'return'.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/power/supply/bq256xx_charger.c | 12 ------------
 1 file changed, 12 deletions(-)
diff mbox series

Patch

diff --git a/drivers/power/supply/bq256xx_charger.c b/drivers/power/supply/bq256xx_charger.c
index 01ad84fd147c..66d432958c84 100644
--- a/drivers/power/supply/bq256xx_charger.c
+++ b/drivers/power/supply/bq256xx_charger.c
@@ -878,8 +878,6 @@  static int bq256xx_set_charger_property(struct power_supply *psy,
 	switch (prop) {
 	case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT:
 		ret = bq->chip_info->bq256xx_set_iindpm(bq, val->intval);
-		if (ret)
-			return ret;
 		break;
 
 	case POWER_SUPPLY_PROP_STATUS:
@@ -887,32 +885,22 @@  static int bq256xx_set_charger_property(struct power_supply *psy,
 
 	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
 		ret = bq->chip_info->bq256xx_set_vbatreg(bq, val->intval);
-		if (ret)
-			return ret;
 		break;
 
 	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
 		ret = bq->chip_info->bq256xx_set_ichg(bq, val->intval);
-		if (ret)
-			return ret;
 		break;
 
 	case POWER_SUPPLY_PROP_PRECHARGE_CURRENT:
 		ret = bq->chip_info->bq256xx_set_iprechg(bq, val->intval);
-		if (ret)
-			return ret;
 		break;
 
 	case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT:
 		ret = bq->chip_info->bq256xx_set_iterm(bq, val->intval);
-		if (ret)
-			return ret;
 		break;
 
 	case POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT:
 		ret = bq->chip_info->bq256xx_set_vindpm(bq, val->intval);
-		if (ret)
-			return ret;
 		break;
 
 	default: