]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt: boot_get_fdt: simplify no_fdt handling (non-functional)
authorEugeniu Rosca <erosca@de.adit-jv.com>
Mon, 1 Apr 2019 10:45:35 +0000 (12:45 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 24 Apr 2019 02:26:43 +0000 (20:26 -0600)
Increase the readability of boot_get_fdt().
No change in behavior is expected.

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/image-fdt.c

index c335e7e2f220a54127c6cecb33e3ca295c650a9b..68bcab85baf4e0bb02aa39ae575a48976979fc80 100644 (file)
@@ -279,7 +279,6 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
        int             fdt_noffset;
 #endif
        const char *select = NULL;
-       int             ok_no_fdt = 0;
 
        *of_flat_tree = NULL;
        *of_size = 0;
@@ -487,12 +486,9 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
        return 0;
 
 no_fdt:
-       ok_no_fdt = 1;
+       debug("Continuing to boot without FDT\n");
+       return 0;
 error:
-       if (ok_no_fdt) {
-               debug("Continuing to boot without FDT\n");
-               return 0;
-       }
        return 1;
 }