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 2/4] mmc: sdhci: Fix vqmmc error setting
Date: Fri, 31 Oct 2014 14:22:49 +0200	[thread overview]
Message-ID: <1414758171-1244-3-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1414758171-1244-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 f895ab0..7736a2c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3091,7 +3091,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-10-31 12:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 12:22 [PATCH 0/4] mmc: sdhci: Add HS400 support to SDHCI driver Adrian Hunter
2014-10-31 12:22 ` [PATCH 1/4] mmc: sdhci: Remove unused SDHCI_CTRL_HS_SDR200 Adrian Hunter
2014-10-31 12:22 ` Adrian Hunter [this message]
2014-10-31 12:22 ` [PATCH 3/4] mmc: sdhci: Clear also HS400 1.2V capability if 1.2V is not supported Adrian Hunter
2014-11-05 13:36   ` Ulf Hansson
2014-11-05 13:50     ` Adrian Hunter
2014-11-05 14:00       ` Ulf Hansson
2014-10-31 12:22 ` [PATCH 4/4] mmc: sdhci: Add HS400 support to SDHCI driver Adrian Hunter

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=1414758171-1244-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