summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-06-16 00:09:35 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-02 10:26:39 -0700
commit185f2172bd89d83b14cb9e49fc63e6c956338d52 (patch)
tree1f1a1db356cf693eb5221d73fdaa39e1c3467507 /arch
parent300a7b4c1e3bbb3bd5e5db9af0a059f521f00789 (diff)
powerpc: Fix logic error in fixup_irqs
commit 3cd8519248e9e17d982c6fab0f1a89bca6feb49a upstream. When SPARSE_IRQ is set, irq_to_desc() can return NULL. While the code here has a check for NULL, it's not really correct. Fix it by separating the check for it. This fixes CPU hot unplug for me. Reported-by: Alastair Bridgewater <alastair.bridgewater@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index dee83b82487f..11b300a1e6ce 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -247,7 +247,10 @@ void fixup_irqs(cpumask_t map)
cpumask_t mask;
desc = irq_to_desc(irq);
- if (desc && desc->status & IRQ_PER_CPU)
+ if (!desc)
+ continue;
+
+ if (desc->status & IRQ_PER_CPU)
continue;
cpumask_and(&mask, desc->affinity, &map);