[PATCH 26/36] power: supply: pm8916_lbc: remove conditional return with no effect

From: Sang-Heon Jeon

Date: Thu Jul 23 2026 - 15:04:17 EST


Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
---
drivers/power/supply/pm8916_lbc.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/power/supply/pm8916_lbc.c b/drivers/power/supply/pm8916_lbc.c
index cdc4d78c4219..569f3f4b16fe 100644
--- a/drivers/power/supply/pm8916_lbc.c
+++ b/drivers/power/supply/pm8916_lbc.c
@@ -231,11 +231,9 @@ static int pm8916_lbc_charger_probe_dt(struct pm8916_lbc_charger *chg)
return ret;

/* Disable charger timeout. */
- ret = regmap_write(chg->regmap, chg->reg[LBC_CHGR] + PM8916_LBC_CHGR_TCHG_MAX_EN, 0x00);
- if (ret)
- return ret;
-
- return ret;
+ return regmap_write(chg->regmap,
+ chg->reg[LBC_CHGR] + PM8916_LBC_CHGR_TCHG_MAX_EN,
+ 0x00);
}

static const struct power_supply_desc pm8916_lbc_charger_psy_desc = {
--
2.43.0