[PATCH] regulator: qcom_usb_vbus: Check the VBUS control source update

From: Zhu Jun

Date: Thu Nov 12 2026 - 02:25:04 EST


Probe disables the hardware VBUS enable source so that the regulator
operations can control the output, but ignores a failed register
update. Probe can succeed while the hardware still uses its previous
control source.

Propagate the update error instead of reporting successful setup.

Fixes: 4fe66d5a62fb ("regulator: Add support for QCOM PMIC VBUS booster")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
drivers/regulator/qcom_usb_vbus-regulator.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/qcom_usb_vbus-regulator.c b/drivers/regulator/qcom_usb_vbus-regulator.c
index d909a6f2b7f1..035229d8744a 100644
--- a/drivers/regulator/qcom_usb_vbus-regulator.c
+++ b/drivers/regulator/qcom_usb_vbus-regulator.c
@@ -158,9 +158,8 @@ static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev)
}

/* Disable HW logic for VBUS enable */
- regmap_update_bits(regmap, base + data->otg_cfg, data->otg_en_src_cfg, 0);
-
- return 0;
+ return regmap_update_bits(regmap, base + data->otg_cfg,
+ data->otg_en_src_cfg, 0);
}

static const struct of_device_id qcom_usb_vbus_regulator_match[] = {
--
2.51.0