public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq/irqdesc: Fix a bug in alloc_descs()
@ 2019-01-17  3:00 Huacai Chen
  2019-01-17 23:45 ` [tip:irq/urgent] genirq/irqdesc: Fix double increment " tip-bot for Huacai Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Huacai Chen @ 2019-01-17  3:00 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Huacai Chen,
	Dou Liyang

Commit c410abbbacb9b378365b ("genirq/affinity: Add is_managed to struct
irq_affinity_desc") introduce a bug in the for-loop in alloc_descs() by
accident. So fix it.

Fixes: c410abbbacb9b378365b ("genirq/affinity: Add is_managed to struct irq_affinity_desc")
Cc: Dou Liyang <douliyangs@gmail.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 kernel/irq/irqdesc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index ee062b7..ef8ad36 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;
 		}
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-17 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-17  3:00 [PATCH] genirq/irqdesc: Fix a bug in alloc_descs() Huacai Chen
2019-01-17 23:45 ` [tip:irq/urgent] genirq/irqdesc: Fix double increment " tip-bot for Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox