diff options
author | Dov Levenglick <dovl@codeaurora.org> | 2016-10-18 03:10:14 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-09 01:29:58 +0300 |
commit | 8643ae66ce749f63ea0de928f5059b7b5f8b30cd (patch) | |
tree | 9f2b5dbd2598ff00a7b8df1adbde91fd2da431e7 /drivers/scsi/ufs | |
parent | a508253d0916a0c5973081c4059425ec04e324c8 (diff) | |
download | linux-8643ae66ce749f63ea0de928f5059b7b5f8b30cd.tar.xz |
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: Dov Levenglick <dovl@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-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 93e2fe82822f..d2930fb8b446 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5051,9 +5051,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 */ |