aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2013-06-19 10:17:00 +0100
committerJon Medhurst <tixy@linaro.org>2013-06-19 10:17:00 +0100
commitc8a4039ef5a45b6cf3653294c2473d2c7de51392 (patch)
tree39b82d418914bdb57a0f37bab89e2265d33631c4
parente995eaeced0e6b804563778d7f68e38fbae44dd3 (diff)
Otherwise we get a nullptr dereference calling vexpress_spc_get_nb_cpus. Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--arch/arm/mach-vexpress/tc2_pm_psci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-vexpress/tc2_pm_psci.c b/arch/arm/mach-vexpress/tc2_pm_psci.c
index 5a5e4f568497..c2fdc22e4c06 100644
--- a/arch/arm/mach-vexpress/tc2_pm_psci.c
+++ b/arch/arm/mach-vexpress/tc2_pm_psci.c
@@ -155,6 +155,11 @@ static int __init tc2_pm_psci_init(void)
return -ENODEV;
}
+ if (!vexpress_spc_check_loaded()) {
+ pr_debug("spc not found. Aborting psci init\n");
+ return -ENODEV;
+ }
+
tc2_pm_usage_count_init();
ret = mcpm_platform_register(&tc2_pm_power_ops);