summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2019-01-17 11:00:09 +0800
committerThomas Gleixner <tglx@linutronix.de>2019-01-18 00:43:09 +0100
commit12fee4cd5be2c4a73cc13d7ad76eb2d2feda8a71 (patch)
treeb2906080d53cdb9c9ed3dcb4bba72bd4d8c75aa0 /kernel
parent70921ae25f944423f0abf096f73455c586da0652 (diff)
downloadlinux-12fee4cd5be2c4a73cc13d7ad76eb2d2feda8a71.tar.bz2
genirq/irqdesc: Fix double increment in alloc_descs()
The recent rework of alloc_descs() introduced a double increment of the loop counter. As a consequence only every second affinity mask is validated. Remove it. [ tglx: Massaged changelog ] Fixes: c410abbbacb9 ("genirq/affinity: Add is_managed to struct irq_affinity_desc") Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: Huacai Chen <chenhuacai@gmail.com> Cc: Dou Liyang <douliyangs@gmail.com> Link: https://lkml.kernel.org/r/1547694009-16261-1-git-send-email-chenhc@lemote.com
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/irqdesc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index ee062b7939d3..ef8ad36cadcf 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -457,7 +457,7 @@ static int alloc_descs(unsigned int start, unsigned int cnt, int node,
/* Validate affinity mask(s) */
if (affinity) {
- for (i = 0; i < cnt; i++, i++) {
+ for (i = 0; i < cnt; i++) {
if (cpumask_empty(&affinity[i].mask))
return -EINVAL;
}