summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBryan Wu <pengw@nvidia.com>2014-05-15 20:20:09 -0700
committerMatthew Pedro <mapedro@nvidia.com>2014-05-21 12:40:48 -0700
commit50369e94ca5063e2e0abb70418791969dd9ed679 (patch)
tree7b528b2ddfac5b4d9cfa311ae12cc568ee28d7ae /common
parentbd208887dc22085c995b7357f017f44a8e912796 (diff)
downloadu-boot-50369e94ca5063e2e0abb70418791969dd9ed679.tar.gz
cmd_mmc.c: check mmc_init() during mmc dev
mmc dev ${devnum} will return 0 as success even if there is no card inserted. Booting script like tegra-common-post.h will call mmc dev ${devnum} to check the mmc device status, it always return 0 even if mmc_init() fails. Check mmc_init() return value let mmc dev command return failure when mmc_init() fails. Bug 200004721 Bug 1482099 Change-Id: Ida166777b62c0906912394bb06bbc083251c458d Signed-off-by: Bryan Wu <pengw@nvidia.com> Reviewed-on: http://git-master/r/410665 Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Jong Kim <jongk@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 2d51927060..4136c24692 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -217,7 +217,9 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
}
- mmc_init(mmc);
+ if (mmc_init(mmc));
+ return 1;
+
if (part != -1) {
int ret;
if (mmc->part_config == MMCPART_NOAVAILABLE) {