arm64: check for NULL bus on DEVICE_PATH_CPU_CLUSTER devices

If there are no devices underneath a device in a devicetree the
bus pointer in a struct device is NULL. Check for this condition
before proceeding in walking through the children devices.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Ran through coreboot w/o any devices under the cpu_cluster device.
     No more exceptions.

Change-Id: I891aeb36319dce67ce9e431156c85c74177c7ab7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/217511
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
Aaron Durbin 2014-09-11 16:03:17 -05:00 committed by chrome-internal-fetch
commit d21e181077

View file

@ -299,6 +299,11 @@ void arch_initialize_cpus(device_t cluster, struct cpu_control_ops *cntrl_ops)
}
bus = cluster->link_list;
/* Check if no children under this device. */
if (bus == NULL)
return;
entry = prepare_secondary_cpu_startup();
/* Initialize the cpu_info structures. */