[PATCH] regulator: tps65023: Check the I2C voltage control setup error
From: Zhu Jun
Date: Thu Nov 12 2026 - 02:42:32 EST
Probe clears CORE_ADJ to enable output voltage control over I2C, but
ignores a failure of that register update. The driver can then bind
without having enabled the voltage control used by its regulator
operations.
Return the update result so a failed setup aborts probe. The regulator
registrations are managed and are unwound by the driver core.
Fixes: f068ad8cca75 ("regulator: tps65023: Fixes i2c configuration issues")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
drivers/regulator/tps65023-regulator.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 57b91b1fe328..cdebb249cb0f 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -302,10 +302,8 @@ static int tps_65023_probe(struct i2c_client *client)
i2c_set_clientdata(client, tps);
/* Enable setting output voltage by I2C */
- regmap_update_bits(tps->regmap, TPS65023_REG_CON_CTRL2,
- TPS65023_REG_CTRL2_CORE_ADJ, 0);
-
- return 0;
+ return regmap_update_bits(tps->regmap, TPS65023_REG_CON_CTRL2,
+ TPS65023_REG_CTRL2_CORE_ADJ, 0);
}
static const struct of_device_id __maybe_unused tps65023_of_match[] = {
--
2.51.0