]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/padata.c
Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-devfreq'
[karo-tx-linux.git] / kernel / padata.c
index 3202aa17492c808af5331044de710a2f34e277a3..ac8f1e524836b37a0d305e412b19d6aeeb50c133 100644 (file)
@@ -154,8 +154,6 @@ EXPORT_SYMBOL(padata_do_parallel);
  * A pointer to the control struct of the next object that needs
  * serialization, if present in one of the percpu reorder queues.
  *
- * NULL, if all percpu reorder queues are empty.
- *
  * -EINPROGRESS, if the next object that needs serialization will
  *  be parallel processed by another cpu and is not yet present in
  *  the cpu's reorder queue.
@@ -182,8 +180,6 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd)
        cpu = padata_index_to_cpu(pd, next_index);
        next_queue = per_cpu_ptr(pd->pqueue, cpu);
 
-       padata = NULL;
-
        reorder = &next_queue->reorder;
 
        spin_lock(&reorder->lock);
@@ -235,12 +231,11 @@ static void padata_reorder(struct parallel_data *pd)
                padata = padata_get_next(pd);
 
                /*
-                * All reorder queues are empty, or the next object that needs
-                * serialization is parallel processed by another cpu and is
-                * still on it's way to the cpu's reorder queue, nothing to
-                * do for now.
+                * If the next object that needs serialization is parallel
+                * processed by another cpu and is still on it's way to the
+                * cpu's reorder queue, nothing to do for now.
                 */
-               if (!padata || PTR_ERR(padata) == -EINPROGRESS)
+               if (PTR_ERR(padata) == -EINPROGRESS)
                        break;
 
                /*
@@ -354,7 +349,7 @@ static int padata_setup_cpumasks(struct parallel_data *pd,
 
        cpumask_and(pd->cpumask.pcpu, pcpumask, cpu_online_mask);
        if (!alloc_cpumask_var(&pd->cpumask.cbcpu, GFP_KERNEL)) {
-               free_cpumask_var(pd->cpumask.cbcpu);
+               free_cpumask_var(pd->cpumask.pcpu);
                return -ENOMEM;
        }