summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/dw_mmc-k3.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2020-04-16 18:36:47 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2020-05-28 11:20:58 +0200
commit9cbe0fc8cd9c156ff187231dbb38b02ee20fc8c6 (patch)
treee2e52db264f575f6d6a7c17e54e9be1509c46648 /drivers/mmc/host/dw_mmc-k3.c
parent098c408b040d49158dc6aea52db7493187ac5e09 (diff)
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/dw_mmc-k3.c')
-rw-r--r--drivers/mmc/host/dw_mmc-k3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index 23b6f65b3785..50977ff18074 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -424,7 +424,7 @@ static int dw_mci_hi3660_switch_voltage(struct mmc_host *mmc,
if (!IS_ERR(mmc->supply.vqmmc)) {
ret = mmc_regulator_set_vqmmc(mmc, ios);
- if (ret) {
+ if (ret < 0) {
dev_err(host->dev, "Regulator set error %d\n", ret);
return ret;
}