Skip to content

Commit 233b594

Browse files
Dolev RavivChristoph Hellwig
authored andcommitted
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 <[email protected]> Reviewed-by: Maya Erez <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 5064636 commit 233b594

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/ufs/ufshcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5104,7 +5104,7 @@ int ufshcd_system_suspend(struct ufs_hba *hba)
51045104
int ret = 0;
51055105

51065106
if (!hba || !hba->is_powered)
5107-
goto out;
5107+
return 0;
51085108

51095109
if (pm_runtime_suspended(hba->dev)) {
51105110
if (hba->rpm_lvl == hba->spm_lvl)

0 commit comments

Comments
 (0)