diff options
author | kientzle <kientzle@FreeBSD.org> | 2012-05-11 04:18:39 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2012-05-11 04:18:39 +0000 |
commit | 47b655c0b7f69a36694916c6068689db1b4806c7 (patch) | |
tree | c4e65a404116a0f1c4d095a2ea5164c5acce194a /sys/boot/fdt/fdt_loader_cmd.c | |
parent | cd6d4aa47d065085456ba24459657f56bcff74b7 (diff) | |
download | FreeBSD-src-47b655c0b7f69a36694916c6068689db1b4806c7.zip FreeBSD-src-47b655c0b7f69a36694916c6068689db1b4806c7.tar.gz |
Don't hang if there is no /cpus node in the device tree.
Diffstat (limited to 'sys/boot/fdt/fdt_loader_cmd.c')
-rw-r--r-- | sys/boot/fdt/fdt_loader_cmd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/boot/fdt/fdt_loader_cmd.c b/sys/boot/fdt/fdt_loader_cmd.c index b053db0..6e713b6 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; |