diff options
author | Huacai Chen <[email protected]> | 2019-01-17 11:00:09 +0800 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2019-01-18 00:43:09 +0100 |
commit | 12fee4cd5be2c4a73cc13d7ad76eb2d2feda8a71 (patch) | |
tree | b2906080d53cdb9c9ed3dcb4bba72bd4d8c75aa0 | |
parent | 70921ae25f944423f0abf096f73455c586da0652 (diff) |
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Fuxin Zhang <[email protected]>
Cc: Zhangjin Wu <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: Dou Liyang <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r-- | kernel/irq/irqdesc.c | 2 |
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; } |