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>
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);