summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-sprd.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2020-04-16 19:36:47 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2020-05-28 12:20:58 +0300
commit9cbe0fc8cd9c156ff187231dbb38b02ee20fc8c6 (patch)
treee2e52db264f575f6d6a7c17e54e9be1509c46648 /drivers/mmc/host/sdhci-sprd.c
parent098c408b040d49158dc6aea52db7493187ac5e09 (diff)
downloadlinux-9cbe0fc8cd9c156ff187231dbb38b02ee20fc8c6.tar.xz
mmc: host: Prepare host drivers for mmc_regulator_set_vqmmc() returning > 0
Patch all drivers which use mmc_regulator_set_vqmmc() and prepare them for the fact that mmc_regulator_set_vqmmc() can return a value > 0, which would happen if the signal voltage switch did NOT happen, because the voltage was already set correctly. Signed-off-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20200416163649.336967-1-marex@denx.de [Ulf: Re-worked/simplified the code a bit] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-sprd.c')
-rw-r--r--drivers/mmc/host/sdhci-sprd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index 60c3a4c620f9..d10797a8775e 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -434,7 +434,7 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
if (!IS_ERR(mmc->supply.vqmmc)) {
ret = mmc_regulator_set_vqmmc(mmc, ios);
- if (ret) {
+ if (ret < 0) {
pr_err("%s: Switching signalling voltage failed\n",
mmc_hostname(mmc));
return ret;