[PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Mark Brown <broonie@xxxxxxxxxx>

Commit 67a964490bfd14 (arm: use early_init_dt_scan) in the OF tree in
-next converts ARM to use early_init_dt_scan(), factoring out some common
code. However it ignores the return value of the function meaning that on
non-DT platforms the kernel fails to boot as it attempts to configure
itself using DT.

Fix this by adding the appropriate return value check.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
 arch/arm/kernel/devtree.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 04050f7..67f4ebe 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -198,7 +198,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
 	if (!dt_phys)
 		return NULL;
 
-	early_init_dt_scan(phys_to_virt(dt_phys));
+	if (!early_init_dt_scan(phys_to_virt(dt_phys)))
+		return NULL;
 
 	/* Search the mdescs for the 'best' compatible value match */
 	dt_root = of_get_flat_dt_root();
-- 
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux