[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220425084723.3495323-1-chi.minghao@zte.com.cn>
Date: Mon, 25 Apr 2022 08:47:23 +0000
From: cgel.zte@...il.com
To: sre@...nel.org
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] power: supply: remove unnecessary return in switch statement
From: Minghao Chi <chi.minghao@....com.cn>
Since there's a return immediately after the 'break', there's no need for
this extra 'return'.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
drivers/power/supply/bq256xx_charger.c | 12 ------------
1 file changed, 12 deletions(-)
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:
--
2.25.1
Powered by blists - more mailing lists