From 9b1cb34ceddd7168ed1068d282bd0e99da81cfd2 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 11 May 2012 04:18:39 +0000 Subject: [PATCH] Don't hang if there is no /cpus node in the device tree. --- sys/boot/fdt/fdt_loader_cmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/boot/fdt/fdt_loader_cmd.c b/sys/boot/fdt/fdt_loader_cmd.c index b053db03622..6e713b60b05 100644 --- a/sys/boot/fdt/fdt_loader_cmd.c +++ b/sys/boot/fdt/fdt_loader_cmd.c @@ -317,6 +317,8 @@ fixup_cpubusfreqs(unsigned long cpufreq, unsigned long busfreq) /* We want to modify every subnode of /cpus */ o = fdt_path_offset(fdtp, "/cpus"); + if (o < 0) + return; /* maxo should contain offset of node next to /cpus */ depth = 0;