aboutsummaryrefslogtreecommitdiff
path: root/drivers/ufs/host
diff options
context:
space:
mode:
authorGravatar Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 2023-12-08 12:28:53 +0530
committerGravatar Martin K. Petersen <martin.petersen@oracle.com> 2023-12-13 23:03:45 -0500
commite430c0e08957d111b068d5c0a3f4ddd1b8d790cb (patch)
treec2dec39b04840741599c8c5fbc5ec777937a4827 /drivers/ufs/host
parentscsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset fails (diff)
downloadlinux-e430c0e08957d111b068d5c0a3f4ddd1b8d790cb.tar.gz
linux-e430c0e08957d111b068d5c0a3f4ddd1b8d790cb.tar.bz2
linux-e430c0e08957d111b068d5c0a3f4ddd1b8d790cb.zip
scsi: ufs: qcom: Check the return value of ufs_qcom_power_up_sequence()
If ufs_qcom_power_up_sequence() fails, then it makes no sense to enable the lane clocks and continue ufshcd_hba_enable(). So let's check the return value of ufs_qcom_power_up_sequence(). Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20231208065902.11006-9-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/host')
-rw-r--r--drivers/ufs/host/ufs-qcom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 365a61dbf7ea..b141dd2a9346 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -417,7 +417,10 @@ static int ufs_qcom_hce_enable_notify(struct ufs_hba *hba,
switch (status) {
case PRE_CHANGE:
- ufs_qcom_power_up_sequence(hba);
+ err = ufs_qcom_power_up_sequence(hba);
+ if (err)
+ return err;
+
/*
* The PHY PLL output is the source of tx/rx lane symbol
* clocks, hence, enable the lane clocks only after PHY