summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSang-Heon Jeon <ekffu200098@gmail.com>2026-07-24 03:45:28 +0900
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-07-25 01:02:39 +0200
commitb7c8d46411317f135e7791c0eddc56691de63f07 (patch)
treef5376f9dd8d032ff5ad97b2b381194dbec1f0e79
parent3e7a1ebc32fad5a558254a478efd401c17a24381 (diff)
downloadlinux-next-b7c8d46411317f135e7791c0eddc56691de63f07.tar.gz
linux-next-b7c8d46411317f135e7791c0eddc56691de63f07.zip
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>
-rw-r--r--drivers/power/supply/pm8916_lbc.c6
1 files changed, 1 insertions, 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 = {