Commit 4b464bad authored by Colin Ian King's avatar Colin Ian King Committed by Sebastian Reichel

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: 5069185f ("power: supply: bq25980: Add support for the BQ259xx family")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent ec871696
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment