public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dolev Raviv <draviv@codeaurora.org>
To: James.Bottomley@HansenPartnership.com, hch@infradead.org
Cc: linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	santoshsy@gmail.com, Dolev Raviv <draviv@codeaurora.org>
Subject: [PATCH 3/6] scsi: ufs: fix static checker errors in ufshcd_system_suspend
Date: Thu, 23 Oct 2014 13:25:14 +0300	[thread overview]
Message-ID: <1414059917-13831-4-git-send-email-draviv@codeaurora.org> (raw)
In-Reply-To: <1414059917-13831-1-git-send-email-draviv@codeaurora.org>

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 77a4e38..d3f6ddb 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)
 	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.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project


  parent reply	other threads:[~2014-10-23 10:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 10:25 [PATCH 0/6] various fixes for UFS-PM series Dolev Raviv
2014-10-23 10:25 ` [PATCH 1/6] scsi: ufs: fix reference counting of W-LUs Dolev Raviv
2014-10-23 10:25 ` [PATCH 2/6] scsi: ufs: fix power info after link start-up Dolev Raviv
2014-10-23 10:25 ` Dolev Raviv [this message]
2014-10-23 10:25 ` [PATCH 4/6] scsi: ufs: fix static checker warning in ufshcd_populate_vreg Dolev Raviv
2014-10-23 10:25 ` [PATCH 5/6] scsi: ufs: fix static checker warning in __ufshcd_setup_clocks Dolev Raviv
2014-10-23 10:25 ` [PATCH 6/6] scsi: ufs: fix static checker warning in ufshcd_parse_clock_info Dolev Raviv
2014-10-23 17:15 ` [PATCH 0/6] various fixes for UFS-PM series Christoph Hellwig
2014-10-24  7:53   ` Dolev Raviv
2014-10-24  9:22     ` Christoph Hellwig
2014-10-26 11:04       ` Dolev Raviv
2014-10-27  9:50         ` Christoph Hellwig
2014-11-20 11:19           ` Dolev Raviv
2014-11-20 11:42 ` merez
2014-11-20 16:48 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414059917-13831-4-git-send-email-draviv@codeaurora.org \
    --to=draviv@codeaurora.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hch@infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=santoshsy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox