diff options
author | Chris Ball <cjb@laptop.org> | 2013-03-11 17:51:53 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-03-22 12:40:05 -0400 |
commit | a3361abaae810b717fcb7191e0558bcbdaf1c12d (patch) | |
tree | 880393d8f6ab1fe51f17088fe5dc17205868c43d | |
parent | 22119901621f0aca1fefbb5e7100d76d1879ac16 (diff) |
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>
-rw-r--r-- | drivers/mmc/host/sdhci.c | 7 |
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) | |||
2939 | host->vqmmc = NULL; | 2939 | host->vqmmc = NULL; |
2940 | } | 2940 | } |
2941 | } else { | 2941 | } else { |
2942 | regulator_enable(host->vqmmc); | 2942 | ret = regulator_enable(host->vqmmc); |
2943 | if (!regulator_is_supported_voltage(host->vqmmc, 1700000, | 2943 | if (!regulator_is_supported_voltage(host->vqmmc, 1700000, |
2944 | 1950000)) | 2944 | 1950000)) |
2945 | caps[1] &= ~(SDHCI_SUPPORT_SDR104 | | 2945 | caps[1] &= ~(SDHCI_SUPPORT_SDR104 | |
2946 | SDHCI_SUPPORT_SDR50 | | 2946 | SDHCI_SUPPORT_SDR50 | |
2947 | SDHCI_SUPPORT_DDR50); | 2947 | SDHCI_SUPPORT_DDR50); |
2948 | if (ret) { | ||
2949 | pr_warn("%s: Failed to enable vqmmc regulator: %d\n", | ||
2950 | mmc_hostname(mmc), ret); | ||
2951 | host->vqmmc = NULL; | ||
2952 | } | ||
2948 | } | 2953 | } |
2949 | 2954 | ||
2950 | if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) | 2955 | if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) |