Commit 8643ae66 authored by Dov Levenglick's avatar Dov Levenglick Committed by Martin K. Petersen

scsi: ufs: fail ufshcd_probe_hba() if power configuration fails

In case the power configuration fails, skip further processing of the
probing function and return immediately. This has 2 reasons:

1. Don't allow the UFS to continue running in PWM

2. Avoid multiple calls to pm_runtime_put_sync() when not in error
   handling or power management contexts
Signed-off-by: default avatarDov Levenglick <dovl@codeaurora.org>
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a508253d
...@@ -5051,9 +5051,11 @@ static int ufshcd_probe_hba(struct ufs_hba *hba) ...@@ -5051,9 +5051,11 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
__func__); __func__);
} else { } else {
ret = ufshcd_config_pwr_mode(hba, &hba->max_pwr_info.info); ret = ufshcd_config_pwr_mode(hba, &hba->max_pwr_info.info);
if (ret) if (ret) {
dev_err(hba->dev, "%s: Failed setting power mode, err = %d\n", dev_err(hba->dev, "%s: Failed setting power mode, err = %d\n",
__func__, ret); __func__, ret);
goto out;
}
} }
/* set the state as operational after switching to desired gear */ /* set the state as operational after switching to desired gear */
......
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