From: Johannes Berg Date: Wed, 16 Jun 2010 00:09:35 +0000 (+0000) Subject: powerpc: Fix logic error in fixup_irqs X-Git-Tag: v2.6.33.7~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=185f2172bd89d83b14cb9e49fc63e6c956338d52;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Johannes Berg Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index dee83b82487fb..11b300a1e6ce4 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);