Skip to content

Commit e42f110

Browse files
jhovoldvinodkoul
authored andcommitted
phy: qcom-qmp-pcie-msm8996: fix init-count imbalance
The init counter is not decremented on initialisation errors, which prevents retrying initialisation. Add the missing decrement on initialisation errors so that the counter reflects the state of the device. Fixes: e78f3d1 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: [email protected] # 4.12 Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 9bf03a0 commit e42f110

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy)
379379
ret = regulator_bulk_enable(cfg->num_vregs, qmp->vregs);
380380
if (ret) {
381381
dev_err(qmp->dev, "failed to enable regulators, err=%d\n", ret);
382-
goto err_unlock;
382+
goto err_decrement_count;
383383
}
384384

385385
ret = reset_control_bulk_assert(cfg->num_resets, qmp->resets);
@@ -409,7 +409,8 @@ static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy)
409409
reset_control_bulk_assert(cfg->num_resets, qmp->resets);
410410
err_disable_regulators:
411411
regulator_bulk_disable(cfg->num_vregs, qmp->vregs);
412-
err_unlock:
412+
err_decrement_count:
413+
qmp->init_count--;
413414
mutex_unlock(&qmp->phy_mutex);
414415

415416
return ret;

0 commit comments

Comments
 (0)