summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Jones <michael.jones@matrix-vision.de>2011-07-14 23:09:43 +0000
committerAndy Fleming <afleming@freescale.com>2011-07-15 20:29:22 -0500
commit8fd01b8f6b5b0d8bceec443f0a62b52afa7452a1 (patch)
treeaf8e547fa87f37fee1a7a3dc159dde3f673da9aa
parentc310fc840472a36e4b9d2505830e9dc8d458d63c (diff)
downloadu-boot-imx-8fd01b8f6b5b0d8bceec443f0a62b52afa7452a1.zip
u-boot-imx-8fd01b8f6b5b0d8bceec443f0a62b52afa7452a1.tar.gz
u-boot-imx-8fd01b8f6b5b0d8bceec443f0a62b52afa7452a1.tar.bz2
mmc: rescan fails on empty slot
Fail in 'mmc rescan' if mmc_init() returns error Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Andy Fleming <afleming@freescale.com>
-rw-r--r--common/cmd_mmc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 7335cdc..8f13c22 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);