mmc: check the return value of mmc_select_mode_and_width()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 23 Jan 2020 05:31:12 +0000 (14:31 +0900)
committerPeng Fan <peng.fan@nxp.com>
Mon, 17 Feb 2020 06:55:04 +0000 (14:55 +0800)
Since commit 01298da31d92 ("mmc: Change mode when switching to a boot
partition"), errors in mmc_select_mode_and_width() are ignored.
The return value should be checked.

Fixes: 01298da31d92 ("mmc: Change mode when switching to a boot partition")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc.c

index 6a2b855..2eb5e9d 100644 (file)
@@ -2577,7 +2577,7 @@ static int mmc_startup(struct mmc *mmc)
                err = mmc_get_capabilities(mmc);
                if (err)
                        return err;
-               mmc_select_mode_and_width(mmc, mmc->card_caps);
+               err = mmc_select_mode_and_width(mmc, mmc->card_caps);
        }
 #endif
        if (err)