mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
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>
This commit is contained in:
parent
2211990162
commit
a3361abaae
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue