[U-Boot] [PATCH 3/6] fdt: boot_get_fdt: simplify no_fdt handling (non-functional)

Eugeniu Rosca roscaeugeniu at gmail.com
Sun Mar 31 02:08:35 UTC 2019


Increase the readability of boot_get_fdt().
No change in behavior is expected.

Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
---
 common/image-fdt.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/common/image-fdt.c b/common/image-fdt.c
index c335e7e2f220..68bcab85baf4 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -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;
 }
 
-- 
2.21.0



More information about the U-Boot mailing list