]> git.sur5r.net Git - u-boot/commitdiff
mmc: rescan fails on empty slot
authorMichael Jones <michael.jones@matrix-vision.de>
Thu, 14 Jul 2011 23:09:43 +0000 (23:09 +0000)
committerAndy Fleming <afleming@freescale.com>
Sat, 16 Jul 2011 01:29:22 +0000 (20:29 -0500)
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>
common/cmd_mmc.c

index 7335cdc7577799ff380de9167ec01e2b04c6ef4c..8f13c22d9baba16c2ab6a975a129901987618b33 100644 (file)
@@ -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);