mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-12 06:03:14 -04:00
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 <ekffu200098@gmail.com> Link: https://patch.msgid.link/20260723184538.3888637-27-ekffu200098@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
3e7a1ebc32
commit
b7c8d46411
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user