]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: spl_mmc: Minor cosmetics
authorPaul Kocialkowski <contact@paulk.fr>
Wed, 3 Jun 2015 16:48:51 +0000 (18:48 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 18 Jun 2015 20:11:42 +0000 (16:11 -0400)
This switches some printf calls to puts and avoids a test repetition.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
common/spl/spl_mmc.c

index de495c0dc4895ff3341ebcbb3d1a23f1a5edf5f1..f5ac844c0a3a0bf95e8413960eeab3311f0b6289 100644 (file)
@@ -43,13 +43,12 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
                                          (void *) spl_image.load_addr);
 
 end:
+       if (count == 0) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-       if (count == 0)
-               printf("spl: mmc block read error\n");
+               puts("spl: mmc block read error\n");
 #endif
-
-       if (count == 0)
                return -1;
+       }
 
        return 0;
 }
@@ -63,7 +62,7 @@ static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
        err = get_partition_info(&mmc->block_dev, partition, &info);
        if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-               printf("spl: partition error\n");
+               puts("spl: partition error\n");
 #endif
                return -1;
        }
@@ -83,7 +82,7 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
                (void *) CONFIG_SYS_SPL_ARGS_ADDR);
        if (count == 0) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-               printf("spl: mmc block read error\n");
+               puts("spl: mmc block read error\n");
 #endif
                return -1;
        }