[PATCH v5 11/11] phy: qualcomm: qmp-combo: Fix error propagation in qmp_combo_dp_power_on()

From: Nabige Aala

Date: Thu Oct 01 2026 - 05:56:06 EST


The configure_dp_phy() callback can return an error (e.g. -ETIMEDOUT on
PLL lock failure), but qmp_combo_dp_power_on() was ignoring the return
value and always returning 0.

Capture the return value, skip setting dp_powered_on on failure, and
propagate the error to the caller.

Fixes: dd1153651b038 ("phy: qcom-qmp-combo: merge driver data")
Signed-off-by: Ritesh Kumar <ritesh.kumar@xxxxxxxxxxxxxxxx>
Signed-off-by: Mahadevan P <mahadevan.p@xxxxxxxxxxxxxxxx>
Signed-off-by: Nabige Aala <nabige.aala@xxxxxxxxxxxxxxxx>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 5bbb2b5f8c74..13d5586b981c 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -4376,6 +4376,7 @@ static int qmp_combo_dp_power_on(struct phy *phy)
const struct qmp_phy_cfg *cfg = qmp->cfg;
void __iomem *tx = qmp->dp_tx;
void __iomem *tx2 = qmp->dp_tx2;
+ int ret;

mutex_lock(&qmp->phy_mutex);

@@ -4388,13 +4389,17 @@ static int qmp_combo_dp_power_on(struct phy *phy)
cfg->configure_dp_tx(qmp);

/* Configure link rate, swing, etc. */
- cfg->configure_dp_phy(qmp);
+ ret = cfg->configure_dp_phy(qmp);
+ if (ret) {
+ dev_err(qmp->dev, "DP PHY configuration failed: %d\n", ret);
+ goto out_unlock;
+ }

qmp->dp_powered_on = true;

+out_unlock:
mutex_unlock(&qmp->phy_mutex);
-
- return 0;
+ return ret;
}

static int qmp_combo_dp_power_off(struct phy *phy)

--
2.34.1