aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pcrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pcrypt.c')
-rw-r--r--crypto/pcrypt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index 7153a50bce27..794c172b99f7 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -82,6 +82,9 @@ static int pcrypt_do_parallel(struct padata_priv *padata, unsigned int *cb_cpu,
82 if (cpumask_test_cpu(cpu, cpumask->mask)) 82 if (cpumask_test_cpu(cpu, cpumask->mask))
83 goto out; 83 goto out;
84 84
85 if (!cpumask_weight(cpumask->mask))
86 goto out;
87
85 cpu_index = cpu % cpumask_weight(cpumask->mask); 88 cpu_index = cpu % cpumask_weight(cpumask->mask);
86 89
87 cpu = cpumask_first(cpumask->mask); 90 cpu = cpumask_first(cpumask->mask);