aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorColin Ian King2020-10-06 18:06:00 +0100
committerSebastian Reichel2020-10-08 23:31:01 +0200
commit4b464bad37c65492f03fe6cc15bdb6a9a6a5f5e7 (patch)
tree254d05731355f3a1ccec7c180e4d0c508ccb58e0 /drivers/power
parentec871696b77767672cae1fe3158dbe1a86abcfdd (diff)
power: supply: bq25980: remove redundant zero check on ret
Currently ret is assigned to zero and the following statement checks if it is non-zero. This check is redundant and can be removed Addresses-Coverity: ("Logically dead code") Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bq25980_charger.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/power/supply/bq25980_charger.c b/drivers/power/supply/bq25980_charger.c
index 3995fb7cf060..f04f9acdb13b 100644
--- a/drivers/power/supply/bq25980_charger.c
+++ b/drivers/power/supply/bq25980_charger.c
@@ -613,9 +613,6 @@ static int bq25980_set_battery_property(struct power_supply *psy,
struct bq25980_device *bq = power_supply_get_drvdata(psy);
int ret = 0;
- if (ret)
- return ret;
-
switch (psp) {
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
ret = bq25980_set_const_charge_curr(bq, val->intval);