Since we could move card->host->caps & MMC_CAP_4_BIT_DATA
ahead of mmc_sdio_init_uhs_card, in mmc_host_uhs(). So there
we could save this bit to check that. Also, if the process of
sdio_enable_4bit_bus goes wrong, we should bails out early.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
        if (!card->scr.sda_spec3)
                return 0;
 
-       /*
-        * Switch to wider bus (if supported).
-        */
-       if (card->host->caps & MMC_CAP_4_BIT_DATA)
-               err = sdio_enable_4bit_bus(card);
+       /* Switch to wider bus */
+       err = sdio_enable_4bit_bus(card);
+       if (err)
+               goto out;
 
        /* Set the driver strength for the card */
        sdio_select_driver_type(card);