[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>
This commit is contained in:
Olaf Hering 2008-03-18 06:53:05 +11:00 коммит произвёл Paul Mackerras
Родитель cfe666b145
Коммит 1428a9fa58
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -906,7 +906,7 @@ static int __init init_ipic_sysfs(void)
{ {
int rc; int rc;
if (!primary_ipic->regs) if (!primary_ipic || !primary_ipic->regs)
return -ENODEV; return -ENODEV;
printk(KERN_DEBUG "Registering ipic with sysfs...\n"); printk(KERN_DEBUG "Registering ipic with sysfs...\n");