diff options
| author | Dov Levenglick <dovl@codeaurora.org> | 2014-12-15 16:27:29 +0200 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:58:17 -0700 |
| commit | 84e017fe916fea0cb9407ab73cc73c99072f624a (patch) | |
| tree | 19dfac67b7c9071a7252fcaabf8bcfaf546b7adb | |
| parent | b030bfae539a04ba08c58b6e664bd370215d51c5 (diff) | |
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
Change-Id: I8d6faefadf42385aace903f90ab967c6ddcf7460
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
| -rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 50ab12a7170e..ebfbac0f567c 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6310,9 +6310,11 @@ static int ufshcd_probe_hba(struct ufs_hba *hba) __func__); } else { 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", __func__, ret); + goto out; + } } /* set the state as operational after switching to desired gear */ |
