Commit bc77fb9c authored by Keoseong Park's avatar Keoseong Park Committed by Martin K. Petersen

scsi: ufs: core: Refactor ufshcd_hba_enable()

Use "if error return" style in ufshcd_hba_enable().  No functional change.

Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: default avatarKeoseong Park <keosung.park@samsung.com>
Link: https://lore.kernel.org/r/20221028073553epcms2p6dc4f8bdbebdc8f96f43fc4197b3edd0c@epcms2p6Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e6629dcb
......@@ -4668,14 +4668,18 @@ int ufshcd_hba_enable(struct ufs_hba *hba)
/* enable UIC related interrupts */
ufshcd_enable_intr(hba, UFSHCD_UIC_MASK);
ret = ufshcd_dme_reset(hba);
if (!ret) {
ret = ufshcd_dme_enable(hba);
if (!ret)
ufshcd_vops_hce_enable_notify(hba, POST_CHANGE);
if (ret)
dev_err(hba->dev,
"Host controller enable failed with non-hce\n");
if (ret) {
dev_err(hba->dev, "DME_RESET failed\n");
return ret;
}
ret = ufshcd_dme_enable(hba);
if (ret) {
dev_err(hba->dev, "Enabling DME failed\n");
return ret;
}
ufshcd_vops_hce_enable_notify(hba, POST_CHANGE);
} else {
ret = ufshcd_hba_execute_hce(hba);
}
......
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