diff options
author | Olaf Hering <olaf@aepfle.de> | 2008-03-18 06:53:05 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-24 17:55:00 +1100 |
commit | 1428a9fa586cb80acf98289f797f58b8bd662598 (patch) | |
tree | b65ed9449d1e5c824318f91f8dfe4a2832d0dc29 /arch | |
parent | cfe666b145cecffe784d98e60ffe201a5dc57ac3 (diff) | |
download | op-kernel-dev-1428a9fa586cb80acf98289f797f58b8bd662598.zip op-kernel-dev-1428a9fa586cb80acf98289f797f58b8bd662598.tar.gz |
[POWERPC] Fix crash in init_ipic_sysfs on efika
The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain NULL
if ipic_init() fails, which will happen on machines that don't have an
ipic interrupt controller. init_ipic_sysfs() will crash in that case.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index ae0dbf4..0f2dfb0 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c @@ -906,7 +906,7 @@ static int __init init_ipic_sysfs(void) { int rc; - if (!primary_ipic->regs) + if (!primary_ipic || !primary_ipic->regs) return -ENODEV; printk(KERN_DEBUG "Registering ipic with sysfs...\n"); |