Commit 2ff6365e authored by Peter Griffin's avatar Peter Griffin Committed by Vinod Koul

phy: samsung-ufs: ufs: exit on first reported error

To preserve the err value, exit the loop immediately if an error
is returned.

Fixes: f2c6d0fa ("phy: samsung-ufs: use exynos_get_pmu_regmap_by_phandle() to obtain PMU regmap")
Signed-off-by: default avatarPeter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20240426104129.2211949-3-peter.griffin@linaro.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 8b19c45a
......@@ -99,12 +99,18 @@ static int samsung_ufs_phy_calibrate(struct phy *phy)
for_each_phy_lane(ufs_phy, i) {
if (ufs_phy->ufs_phy_state == CFG_PRE_INIT &&
ufs_phy->drvdata->wait_for_cal)
ufs_phy->drvdata->wait_for_cal) {
err = ufs_phy->drvdata->wait_for_cal(phy, i);
if (err)
goto out;
}
if (ufs_phy->ufs_phy_state == CFG_POST_PWR_HS &&
ufs_phy->drvdata->wait_for_cdr)
ufs_phy->drvdata->wait_for_cdr) {
err = ufs_phy->drvdata->wait_for_cdr(phy, i);
if (err)
goto out;
}
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment