powerpc: Fix mpic_resume on early G5 macs
authorAlastair Bridgewater <alastair.bridgewater@gmail.com>
Sat, 12 Jun 2010 15:36:48 +0000 (15:36 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 15 Jun 2010 05:02:37 +0000 (15:02 +1000)
mpic_resume() on G5 macs blindly dereferences mpic->fixups, but
it may legitimately be NULL (as on PowerMac7,2).  Add an explicit
check.

This fixes suspend-to-disk with one processor (maxcpus=1) for me.

Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/sysdev/mpic.c

index 2102487612a428cdac78735021d55629fc7f369a..20b73c025a4566e599f46192fed18df2ed002fda 100644 (file)
@@ -1666,7 +1666,7 @@ static int mpic_resume(struct sys_device *dev)
                               mpic->save_data[i].dest);
 
 #ifdef CONFIG_MPIC_U3_HT_IRQS
-       {
+       if (mpic->fixups) {
                struct mpic_irq_fixup *fixup = &mpic->fixups[i];
 
                if (fixup->base) {