aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-06-15 20:09:35 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-08 04:11:44 -0400
commit3cd8519248e9e17d982c6fab0f1a89bca6feb49a (patch)
tree56c659bff188ab82343f2ec40d5a0f8a38c46fe7 /arch/powerpc
parentd3005fbc696781d2fd7bd5b5389a94fae5332b58 (diff)
powerpc: Fix logic error in fixup_irqs
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> Cc: stable@kernel.org [2.6.32+] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-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 3333bbdd23ef..77be3d058a65 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -295,7 +295,10 @@ void fixup_irqs(const struct cpumask *map)
295 295
296 for_each_irq(irq) { 296 for_each_irq(irq) {
297 desc = irq_to_desc(irq); 297 desc = irq_to_desc(irq);
298 if (desc && desc->status & IRQ_PER_CPU) 298 if (!desc)
299 continue;
300
301 if (desc->status & IRQ_PER_CPU)
299 continue; 302 continue;
300 303
301 cpumask_and(mask, desc->affinity, map); 304 cpumask_and(mask, desc->affinity, map);