mmc: core: fix multi-bit bus width without high-speed mode
[firefly-linux-kernel-4.4.55.git] / drivers / mmc / core / mmc.c
index 78187699467a11cb6ad43b9fb2298aaeee933a13..79a0c26e14190077d707f9e0141ca230e6d13d2d 100644 (file)
@@ -1581,10 +1581,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                err = mmc_select_hs400(card);
                if (err)
                        goto free_card;
-       } else if (mmc_card_hs(card)) {
+       } else {
                /* Select the desired bus width optionally */
                err = mmc_select_bus_width(card);
-               if (!IS_ERR_VALUE(err)) {
+               if (!IS_ERR_VALUE(err) && mmc_card_hs(card)) {
                        err = mmc_select_hs_ddr(card);
                        if (err)
                                goto free_card;