Commit 3cd85192 authored by Johannes Berg's avatar Johannes Berg Committed by Benjamin Herrenschmidt

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: default avatarAlastair Bridgewater <alastair.bridgewater@gmail.com>
Cc: stable@kernel.org [2.6.32+]
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent d3005fbc
...@@ -295,7 +295,10 @@ void fixup_irqs(const struct cpumask *map) ...@@ -295,7 +295,10 @@ void fixup_irqs(const struct cpumask *map)
for_each_irq(irq) { for_each_irq(irq) {
desc = irq_to_desc(irq); desc = irq_to_desc(irq);
if (desc && desc->status & IRQ_PER_CPU) if (!desc)
continue;
if (desc->status & IRQ_PER_CPU)
continue; continue;
cpumask_and(mask, desc->affinity, map); cpumask_and(mask, desc->affinity, map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment