]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: dw_mmc: Remove check before calling mmc_regulator_set_ocr()
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 16 Dec 2025 11:49:57 +0000 (19:49 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Feb 2026 11:06:52 +0000 (12:06 +0100)
mmc_regulator_set_ocr() already checks if vqmmc is correct.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c

index 6cb891aaa5c2a68d8c69ab128d9e25c07b15057e..b3baa9f1c7e33f8d8409fe27b537a2f64351ea28 100644 (file)
@@ -1427,15 +1427,10 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 
        switch (ios->power_mode) {
        case MMC_POWER_UP:
-               if (!IS_ERR(mmc->supply.vmmc)) {
-                       ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc,
-                                       ios->vdd);
-                       if (ret) {
-                               dev_err(slot->host->dev,
-                                       "failed to enable vmmc regulator\n");
-                               /*return, if failed turn on vmmc*/
-                               return;
-                       }
+               ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
+               if (ret) {
+                       dev_err(slot->host->dev, "failed to enable vmmc regulator\n");
+                       return;
                }
                set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags);
                regs = mci_readl(slot->host, PWREN);