Message ID | 1701407001-471-8-git-send-email-quic_cang@quicinc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable HS-G5 support on SM8550 | expand |
On Thu, Nov 30, 2023 at 09:03:17PM -0800, Can Guo wrote: > In ufs_qcom_power_up_sequence(), check return value of phy_set_mode_ext() > and stop proceeding if phy_set_mode_ext() fails. > > Reviewed-by: Nitin Rawat <quic_nitirawa@quicinc.com> > Signed-off-by: Can Guo <quic_cang@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> - Mani > --- > drivers/ufs/host/ufs-qcom.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index 543939c..ee3f07a 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -475,7 +475,9 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) > return ret; > } > > - phy_set_mode_ext(phy, mode, host->phy_gear); > + ret = phy_set_mode_ext(phy, mode, host->phy_gear); > + if (ret) > + goto out_disable_phy; > > /* power on phy - start serdes and phy's power and clocks */ > ret = phy_power_on(phy); > -- > 2.7.4 >
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 543939c..ee3f07a 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -475,7 +475,9 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) return ret; } - phy_set_mode_ext(phy, mode, host->phy_gear); + ret = phy_set_mode_ext(phy, mode, host->phy_gear); + if (ret) + goto out_disable_phy; /* power on phy - start serdes and phy's power and clocks */ ret = phy_power_on(phy);