From: Adrian Hunter Date: Thu, 6 Nov 2014 13:19:04 +0000 (+0200) Subject: mmc: sdhci: Fix vqmmc error setting X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=4bb74313b3549f5c0c28c4652cae2cee1c2b9c95;p=deliverable%2Flinux.git mmc: sdhci: Fix vqmmc error setting 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 Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index a743d5227eda..c2f4754a28b6 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); } }