public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <chris@printf.net>
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: [PATCH V3 2/4] mmc: sdhci: Fix vqmmc error setting
Date: Thu,  6 Nov 2014 15:19:04 +0200	[thread overview]
Message-ID: <1415279946-5054-3-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1415279946-5054-1-git-send-email-adrian.hunter@intel.com>

supply.vqmmc is used with the IS_ERR macro which means
the value must be valid or an error code.  NULL is
neither, so replace with ERR_PTR(-EINVAL).

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index a743d52..c2f4754 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3096,7 +3096,7 @@ int sdhci_add_host(struct sdhci_host *host)
 		if (ret) {
 			pr_warn("%s: Failed to enable vqmmc regulator: %d\n",
 				mmc_hostname(mmc), ret);
-			mmc->supply.vqmmc = NULL;
+			mmc->supply.vqmmc = ERR_PTR(-EINVAL);
 		}
 	}
 
-- 
1.9.1


  parent reply	other threads:[~2014-11-06 13:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 13:19 [PATCH V3 0/4] mmc: sdhci: Add HS400 support to SDHCI driver Adrian Hunter
2014-11-06 13:19 ` [PATCH V3 1/4] mmc: sdhci: Remove unused SDHCI_CTRL_HS_SDR200 Adrian Hunter
2014-11-06 13:19 ` Adrian Hunter [this message]
2014-11-06 13:19 ` [PATCH V3 3/4] mmc: sdhci: Clear also HS400 1.2V capability if 1.2V is not supported Adrian Hunter
2014-11-06 13:19 ` [PATCH V3 4/4] mmc: sdhci: Add HS400 support to SDHCI driver Adrian Hunter
2014-11-06 13:33 ` [PATCH V3 0/4] " Ulf Hansson

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=1415279946-5054-3-git-send-email-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=chris@printf.net \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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