diff options
author | Jon Medhurst <tixy@linaro.org> | 2013-06-19 10:17:00 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-06-19 10:17:00 +0100 |
commit | c8a4039ef5a45b6cf3653294c2473d2c7de51392 (patch) | |
tree | 39b82d418914bdb57a0f37bab89e2265d33631c4 | |
parent | e995eaeced0e6b804563778d7f68e38fbae44dd3 (diff) |
ARM: vexpress: Ensure SPC driver is loaded before using it in PSCI inittracking-integration-linaro-vexpress-ll-20130621.0tracking-integration-linaro-vexpress-ll-20130620.1tracking-integration-linaro-vexpress-ll-20130620.0
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.c | 5 |
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); |