From: Michael Jones Date: Thu, 14 Jul 2011 23:09:43 +0000 (+0000) Subject: mmc: rescan fails on empty slot X-Git-Tag: v2011.09-rc1~217^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8fd01b8f6b5b0d8bceec443f0a62b52afa7452a1;p=u-boot mmc: rescan fails on empty slot Fail in 'mmc rescan' if mmc_init() returns error Signed-off-by: Michael Jones Acked-by: Andy Fleming --- diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 7335cdc757..8f13c22d9b 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -173,9 +173,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init = 0; - mmc_init(mmc); - return 0; + if (mmc_init(mmc)) + return 1; + else + return 0; } else if (strncmp(argv[1], "part", 4) == 0) { block_dev_desc_t *mmc_dev; struct mmc *mmc = find_mmc_device(curr_device);