Gitweb: http://git.kernel.org/linus/3cd8519248e9e17d982c6fab0f1a89bca6feb49a Commit: 3cd8519248e9e17d982c6fab0f1a89bca6feb49a Parent: d3005fbc696781d2fd7bd5b5389a94fae5332b58 Author: Johannes Berg <johannes@sipsolutions.net> AuthorDate: Wed Jun 16 00:09:35 2010 +0000 Committer: Benjamin Herrenschmidt <benh@kernel.crashing.org> CommitDate: Thu Jul 8 18:11:44 2010 +1000 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> --- arch/powerpc/kernel/irq.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 3333bbd..77be3d0 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -295,7 +295,10 @@ void fixup_irqs(const struct cpumask *map) for_each_irq(irq) { 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); -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
