From b7c8d46411317f135e7791c0eddc56691de63f07 Mon Sep 17 00:00:00 2001 From: Sang-Heon Jeon Date: Fri, 24 Jul 2026 03:45:28 +0900 Subject: [PATCH] power: supply: pm8916_lbc: remove conditional return with no effect 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 Link: https://patch.msgid.link/20260723184538.3888637-27-ekffu200098@gmail.com Signed-off-by: Sebastian Reichel --- drivers/power/supply/pm8916_lbc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/power/supply/pm8916_lbc.c b/drivers/power/supply/pm8916_lbc.c index 6b631012a795..c4e74d6b9c34 100644 --- a/drivers/power/supply/pm8916_lbc.c +++ b/drivers/power/supply/pm8916_lbc.c @@ -232,11 +232,7 @@ 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 = {