diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2020-11-06 20:30:41 +0900 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-11-28 10:44:39 +0800 |
commit | b3dc016caade00e07d5ae45042c9be42f611d625 (patch) | |
tree | ddcc581bd66bf79d91327078d7808d5e0392f4fe /drivers/mmc | |
parent | 58896458b70673a1401b60ba415c0158ae9d08cf (diff) | |
download | u-boot-b3dc016caade00e07d5ae45042c9be42f611d625.tar.gz |
mmc: check a return value about regulator's always-on
Regulator can be set to "always-on".
It's not error about enable/disable. It needs to check about
its condition.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 54dcfb7003..a6394bcf30 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2720,7 +2720,7 @@ static int mmc_power_on(struct mmc *mmc) if (mmc->vmmc_supply) { int ret = regulator_set_enable(mmc->vmmc_supply, true); - if (ret) { + if (ret && ret != -EACCES) { printf("Error enabling VMMC supply : %d\n", ret); return ret; } @@ -2736,7 +2736,7 @@ static int mmc_power_off(struct mmc *mmc) if (mmc->vmmc_supply) { int ret = regulator_set_enable(mmc->vmmc_supply, false); - if (ret) { + if (ret && ret != -EACCES) { pr_debug("Error disabling VMMC supply : %d\n", ret); return ret; } |