[SPARC]: Check kzalloc() return value in SUN4D irq/iommu init.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2006-11-30 17:11:26 -08:00
parent c80892d150
commit d4accd60d2
2 changed files with 9 additions and 0 deletions

View File

@ -546,6 +546,10 @@ void __init sun4d_init_sbi_irq(void)
for_each_sbus(sbus)
nsbi++;
sbus_actions = kzalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC);
if (!sbus_actions) {
prom_printf("SUN4D: Cannot allocate sbus_actions, halting.\n");
prom_halt();
}
for_each_sbus(sbus) {
#ifdef CONFIG_SMP
extern unsigned char boot_cpu_id;