All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhash Jadavani" <subhashj@codeaurora.org>
To: 'Dolev Raviv' <draviv@codeaurora.org>,
	James.Bottomley@HansenPartnership.com, hch@infradead.org
Cc: linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	santoshsy@gmail.com
Subject: RE: [PATCH 1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend
Date: Sun, 5 Oct 2014 15:44:16 -0700	[thread overview]
Message-ID: <000301cfe0ed$e5221200$af663600$@codeaurora.org> (raw)
In-Reply-To: <1412518207-27135-1-git-send-email-draviv@codeaurora.org>

Looks good, Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Dolev Raviv
Sent: Sunday, October 05, 2014 7:10 AM
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
Subject: [PATCH 1/1] ufs: scsi: fix sparse 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>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the
body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-10-05 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-10-11 11:06   ` Christoph Hellwig
2014-10-21 14:05     ` Christoph Hellwig
2014-10-21 18:50       ` Subhash Jadavani

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='000301cfe0ed$e5221200$af663600$@codeaurora.org' \
    --to=subhashj@codeaurora.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=draviv@codeaurora.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.