summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2013-03-11 22:51:53 +0100
committerChris Ball <cjb@laptop.org>2013-03-22 17:40:05 +0100
commita3361abaae810b717fcb7191e0558bcbdaf1c12d (patch)
tree880393d8f6ab1fe51f17088fe5dc17205868c43d /drivers/mmc
parentmmc: wmt-sdmmc: Use resource_size() (diff)
downloadlinux-a3361abaae810b717fcb7191e0558bcbdaf1c12d.tar.xz
linux-a3361abaae810b717fcb7191e0558bcbdaf1c12d.zip
mmc: sdhci: Don't ignore regulator_enable() return value
Fixes: /git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host': /git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result] Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 81d52942677c..2ea429c27714 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2939,12 +2939,17 @@ int sdhci_add_host(struct sdhci_host *host)
host->vqmmc = NULL;
}
} else {
- regulator_enable(host->vqmmc);
+ ret = regulator_enable(host->vqmmc);
if (!regulator_is_supported_voltage(host->vqmmc, 1700000,
1950000))
caps[1] &= ~(SDHCI_SUPPORT_SDR104 |
SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);
+ if (ret) {
+ pr_warn("%s: Failed to enable vqmmc regulator: %d\n",
+ mmc_hostname(mmc), ret);
+ host->vqmmc = NULL;
+ }
}
if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V)