mmc: sdhci: Fix vqmmc error setting
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 6 Nov 2014 13:19:04 +0000 (15:19 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 26 Nov 2014 13:30:51 +0000 (14:30 +0100)
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>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c

index a743d5227eda10eca2f3b65097ea5c8b13388616..c2f4754a28b6bfc81605e5ecb9f0d9ce3c0c47a4 100644 (file)
@@ -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);
                }
        }