summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2017-01-10 11:18:43 +0100
committerJaehoon Chung <jh80.chung@samsung.com>2017-01-23 15:37:42 +0900
commit919b485834a746cf839ccded41e456d17d57a31f (patch)
tree0bb4b1d043a36f63dda5a474c6dfd8fa6e5e2463 /drivers
parent6d0e34bf4e21596563e5f5950d097a2eab4c81a8 (diff)
downloadu-boot-imx-919b485834a746cf839ccded41e456d17d57a31f.zip
u-boot-imx-919b485834a746cf839ccded41e456d17d57a31f.tar.gz
u-boot-imx-919b485834a746cf839ccded41e456d17d57a31f.tar.bz2
mmc: Print error code for mmc_complete_init failure
Print the error code for non-zero (failure case) instead of making debug statement without any condition, this usually gives proper clue in failure condition. Log:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 9f8368a..3648950 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1751,7 +1751,9 @@ int mmc_init(struct mmc *mmc)
if (!err)
err = mmc_complete_init(mmc);
- debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
+ if (err)
+ printf("%s: %d, time %lu\n", __func__, err, get_timer(start));
+
return err;
}