aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f05a37747b3d..949e18c7c05d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2849,9 +2849,12 @@ int sdhci_add_host(struct sdhci_host *host)
2849 2849
2850 /* If vqmmc regulator and no 1.8V signalling, then there's no UHS */ 2850 /* If vqmmc regulator and no 1.8V signalling, then there's no UHS */
2851 host->vqmmc = regulator_get(mmc_dev(mmc), "vqmmc"); 2851 host->vqmmc = regulator_get(mmc_dev(mmc), "vqmmc");
2852 if (IS_ERR(host->vqmmc)) { 2852 if (IS_ERR_OR_NULL(host->vqmmc)) {
2853 pr_info("%s: no vqmmc regulator found\n", mmc_hostname(mmc)); 2853 if (PTR_ERR(host->vqmmc) < 0) {
2854 host->vqmmc = NULL; 2854 pr_info("%s: no vqmmc regulator found\n",
2855 mmc_hostname(mmc));
2856 host->vqmmc = NULL;
2857 }
2855 } 2858 }
2856 else if (regulator_is_supported_voltage(host->vqmmc, 1800000, 1800000)) 2859 else if (regulator_is_supported_voltage(host->vqmmc, 1800000, 1800000))
2857 regulator_enable(host->vqmmc); 2860 regulator_enable(host->vqmmc);
@@ -2907,9 +2910,12 @@ int sdhci_add_host(struct sdhci_host *host)
2907 ocr_avail = 0; 2910 ocr_avail = 0;
2908 2911
2909 host->vmmc = regulator_get(mmc_dev(mmc), "vmmc"); 2912 host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
2910 if (IS_ERR(host->vmmc)) { 2913 if (IS_ERR_OR_NULL(host->vmmc)) {
2911 pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc)); 2914 if (PTR_ERR(host->vmmc) < 0) {
2912 host->vmmc = NULL; 2915 pr_info("%s: no vmmc regulator found\n",
2916 mmc_hostname(mmc));
2917 host->vmmc = NULL;
2918 }
2913 } else 2919 } else
2914 regulator_enable(host->vmmc); 2920 regulator_enable(host->vmmc);
2915 2921