diff options
author | Dolev Raviv <draviv@codeaurora.org> | 2014-10-23 06:25:14 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 11:47:41 -0500 |
commit | 233b594bdf6d846f03816eec1c19ccbd7e4618c0 (patch) | |
tree | b81879930e1a5b11820b15c08847ef1fb67ef1c2 /drivers/scsi | |
parent | 5064636c759628caee3b855048be25a9a33cc8ad (diff) |
scsi: ufs: fix static checker errors in ufshcd_system_suspend
This patch fixes newly introduced sparse warning in
ufshcd_system_suspend, introduced by UFS power management series.
Sparse warning:
drivers/scsi/ufs/ufshcd.c:5118 ufshcd_system_suspend()
error: we previously assumed 'hba' could be null (see line 5089)
To fix it, we return 0 in case HBA is not initialized or is
not powered.
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Reviewed-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 77a4e38020ed..d3f6ddb5d99b 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
@@ -5104,7 +5104,7 @@ int ufshcd_system_suspend(struct ufs_hba *hba) | |||
5104 | int ret = 0; | 5104 | int ret = 0; |
5105 | 5105 | ||
5106 | if (!hba || !hba->is_powered) | 5106 | if (!hba || !hba->is_powered) |
5107 | goto out; | 5107 | return 0; |
5108 | 5108 | ||
5109 | if (pm_runtime_suspended(hba->dev)) { | 5109 | if (pm_runtime_suspended(hba->dev)) { |
5110 | if (hba->rpm_lvl == hba->spm_lvl) | 5110 | if (hba->rpm_lvl == hba->spm_lvl) |