Commit 1428a9fa authored by Olaf Hering's avatar Olaf Hering Committed by Paul Mackerras

[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: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent cfe666b1
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment