]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: Print error code for mmc_complete_init failure
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 10 Jan 2017 10:18:43 +0000 (11:18 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 23 Jan 2017 06:37:42 +0000 (15:37 +0900)
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:

drivers/mmc/mmc.c

index 9f8368a123a119bcf2d259b1dd74c168159c6c48..3648950cf5a3fc39cb736b01eafa1b82308ff14c 100644 (file)
@@ -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;
 }