summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ufs/host/ufs-mediatek.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index dcccb63f74b9..47b5f49cda9d 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1201,9 +1201,11 @@ static int ufs_mtk_link_set_hpm(struct ufs_hba *hba)
}
ufshcd_set_link_active(hba);
- if (!hba->mcq_enabled) {
- err = ufshcd_make_hba_operational(hba);
- } else {
+ err = ufshcd_make_hba_operational(hba);
+ if (err)
+ return err;
+
+ if (is_mcq_enabled(hba)) {
ufs_mtk_config_mcq(hba, false);
ufshcd_mcq_make_queues_operational(hba);
ufshcd_mcq_config_mac(hba, hba->nutrs);
@@ -1212,9 +1214,6 @@ static int ufs_mtk_link_set_hpm(struct ufs_hba *hba)
REG_UFS_MEM_CFG);
}
- if (err)
- return err;
-
return 0;
}