linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend
@ 2014-10-05 14:10 Dolev Raviv
  2014-10-05 22:44 ` Subhash Jadavani
  0 siblings, 1 reply; 5+ messages in thread
From: Dolev Raviv @ 2014-10-05 14:10 UTC (permalink / raw)
  To: James.Bottomley, hch; +Cc: linux-scsi, linux-arm-msm, santoshsy, Dolev Raviv

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>

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 497c38a..836ea72 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5087,7 +5087,7 @@ int ufshcd_system_suspend(struct ufs_hba *hba)
 	int ret = 0;
 
 	if (!hba || !hba->is_powered)
-		goto out;
+		return 0;
 
 	if (pm_runtime_suspended(hba->dev)) {
 		if (hba->rpm_lvl == hba->spm_lvl)
-- 
1.8.5.2
--
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-21 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 14:10 [PATCH 1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend Dolev Raviv
2014-10-05 22:44 ` Subhash Jadavani
2014-10-11 11:06   ` Christoph Hellwig
2014-10-21 14:05     ` Christoph Hellwig
2014-10-21 18:50       ` Subhash Jadavani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).