[U-Boot] [PATCH v2 4/7] mmc: rescan fails on empty slot

Michael Jones michael.jones at matrix-vision.de
Mon Jul 18 16:40:22 CEST 2011


Fail in 'mmc rescan' if mmc_init() returns error

Signed-off-by: Michael Jones <michael.jones at matrix-vision.de>
---
Changes for v2:
  - None. Resubmitting to include custodian in cc:

 common/cmd_mmc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 176646d..28918f6 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -165,9 +165,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);
-- 
1.7.5.4


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier


More information about the U-Boot mailing list