Merge branch 'for-3.19/drivers' of git://git.kernel.dk/linux-block
[firefly-linux-kernel-4.4.55.git] / mm / percpu.c
index 014bab65e0ffd82bac0e535cf267d28bfbd09902..d39e2f4e335c36497520b02859c02eb7f46f220f 100644 (file)
@@ -1591,7 +1591,7 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,
                        if (cpu == NR_CPUS)
                                continue;
 
-                       PCPU_SETUP_BUG_ON(cpu > nr_cpu_ids);
+                       PCPU_SETUP_BUG_ON(cpu >= nr_cpu_ids);
                        PCPU_SETUP_BUG_ON(!cpu_possible(cpu));
                        PCPU_SETUP_BUG_ON(unit_map[cpu] != UINT_MAX);