From: Alastair Bridgewater Date: Sat, 12 Jun 2010 15:36:48 +0000 (+0000) Subject: powerpc: Fix mpic_resume on early G5 macs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c9d93604b25c25dc059e2b12ad5e89ca3ed4376;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc: Fix mpic_resume on early G5 macs 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 Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 2102487612a4..20b73c025a45 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -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) {