On 11/21/2016 07:23 PM, Tobias Wolf wrote:
An empty __dtb_start to __dtb_end section might result in initial_boot_params
being null for arch/mips/ralink. This showed that the boot process hangs
indefinitely in of_scan_flat_dt().
Signed-off-by: Tobias Wolf <dev-NTEO@xxxxxxxxx>
---
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -628,6 +628,9 @@
void *data),
void *data)
{
+ if (!initial_boot_params)
+ return;
+
const void *blob = initial_boot_params;
const char *pathp;
int offset, rc = 0, depth = -1;
CC drivers/of/fdt.o
drivers/of/fdt.c: In function ‘of_scan_flat_dt’:
drivers/of/fdt.c:738:3: warning: ‘return’ with no value, in function returning
non-void [-Wreturn-type]
drivers/of/fdt.c:740:2: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
MBR, Sergei