sched/topology: Check variable group before dereferencing it
[linux-2.6-microblaze.git] / kernel / sched / topology.c
index 05a8314..56a0fed 100644 (file)
@@ -47,7 +47,7 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
        if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) {
                printk(KERN_ERR "ERROR: domain->span does not contain CPU%d\n", cpu);
        }
-       if (!cpumask_test_cpu(cpu, sched_group_span(group))) {
+       if (group && !cpumask_test_cpu(cpu, sched_group_span(group))) {
                printk(KERN_ERR "ERROR: domain->groups does not contain CPU%d\n", cpu);
        }